LazyCell

play.api.mvc.request.LazyCell
abstract class LazyCell[A] extends Cell[A]

A cell that evaluates its value on demand. Cell access is unsychronized for performance reasons. However the cell may be safely accessed from multiple threads provided its create method is idempotent.

Attributes

Graph
Supertypes
trait Cell[A]
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

protected def create: A

Create a value. This method is called when the lazy cell is first accessed. After it is first accessed the value will be cached. There is a chance this method will be called more than once if the cell is accessed from multiple threads.

Create a value. This method is called when the lazy cell is first accessed. After it is first accessed the value will be cached. There is a chance this method will be called more than once if the cell is accessed from multiple threads.

Attributes

protected def emptyMarker: A

A value of type A that indicates the cell hasn't been evaluated. Common values are null, None or 0. It's important the marker is not a valid value.

A value of type A that indicates the cell hasn't been evaluated. Common values are null, None or 0. It's important the marker is not a valid value.

Attributes

Concrete methods

override def evaluated: Boolean

Whether or not the cell value has been evaluated yet. Sometimes it is useful to know this to avoid unnecessarily evaluating the cell value.

Whether or not the cell value has been evaluated yet. Sometimes it is useful to know this to avoid unnecessarily evaluating the cell value.

Attributes

Definition Classes
override def value: A

The value in the cell. Calling this method may force the value to be evaluated.

The value in the cell. Calling this method may force the value to be evaluated.

Attributes

Definition Classes

Inherited methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Cell -> Any
Inherited from:
Cell