CallByNeed

magnolia1.CallByNeed
See theCallByNeed companion class
object CallByNeed

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CallByNeed.type

Members list

Value members

Concrete methods

def apply[A](a: => A): CallByNeed[A]

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once.

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once.

If by-name parameter causes serialization issue, use createLazy.

Attributes

def createLazy[A](a: () => A): CallByNeed[A]

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once.

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once.

Attributes

def createValueEvaluator[A](a: () => A): CallByNeed[A]

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once. Evaluation of a value via .valueEvaluator.map(evaluator => evaluator()) will happen every time the evaluator is called

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once. Evaluation of a value via .valueEvaluator.map(evaluator => evaluator()) will happen every time the evaluator is called

Attributes

def withValueEvaluator[A](a: => A): CallByNeed[A]

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once. Evaluation of a value via .valueEvaluator.map(evaluator => evaluator()) will happen every time the evaluator is called

Initializes a class that allows for suspending evaluation of a value until it is needed. Evaluation of a value via .value can only happen once. Evaluation of a value via .valueEvaluator.map(evaluator => evaluator()) will happen every time the evaluator is called

If by-name parameter causes serialization issue, use withValueEvaluator.

Attributes