Packages

case class Folded[Obs, T, U](base: StateValueFn[Obs, T], prepare: (U) ⇒ T, present: (T) ⇒ U) extends StateValueFn[Obs, U] with Product with Serializable

StateValueFn implementation that implements a fold.

Any value supplied to update will be transformed first by prepare before being passed to the base StateValueFn. Any value retrieved by stateValue will be passed to present before being returned.

Source
StateValueFn.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, StateValueFn[Obs, U], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Folded
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. StateValueFn
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Folded(base: StateValueFn[Obs, T], prepare: (U) ⇒ T, present: (T) ⇒ U)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val base: StateValueFn[Obs, T]
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. def fold[U](prepare: (U) ⇒ U, present: (U) ⇒ U): StateValueFn[Obs, U]

    Transforms this StateValueFn into a new instance that applies the supplied prepare to all incoming values before they're learned, and presents tracked T instances using the present fn before returning them via stateValue.

    Transforms this StateValueFn into a new instance that applies the supplied prepare to all incoming values before they're learned, and presents tracked T instances using the present fn before returning them via stateValue.

    Definition Classes
    StateValueFn
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def mergeable(implicit T: Semigroup[U]): StateValueFn[Obs, U]

    Returns a StateValueFn instance that uses the supplied semigroup T to merge values into this current StateValueFn.

    Returns a StateValueFn instance that uses the supplied semigroup T to merge values into this current StateValueFn.

    T

    Semigroup instance used to merge values.

    Definition Classes
    StateValueFn
  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. val prepare: (U) ⇒ T
  17. val present: (T) ⇒ U
  18. def seen: Iterable[Obs]

    Returns an Iterable of all observations associated with some internally tracked value T.

    Returns an Iterable of all observations associated with some internally tracked value T.

    Definition Classes
    FoldedStateValueFn
  19. def stateValue(obs: Obs): U

    Returns the stored value associated with the given observation.

    Returns the stored value associated with the given observation.

    Definition Classes
    FoldedStateValueFn
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toEvaluator[A, R, S[_]]: StateValue[Obs, A, R, U, S]

    TODO fill in.

    TODO fill in.

    Definition Classes
    StateValueFn
  22. def update(obs: Obs, value: U): StateValueFn[Obs, U]

    Absorb a new value for the supplied observation.

    Absorb a new value for the supplied observation. The behavior of this function is implementation dependent; some might ignore the value, some might merge it in to an existing set of values, some might completely replace the stored state.

    Definition Classes
    FoldedStateValueFn
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from StateValueFn[Obs, U]

Inherited from AnyRef

Inherited from Any

Ungrouped