Class

diode

MapModelRW

Related Doc: package diode

Permalink

class MapModelRW[F[_], M, A, B] extends MapModelR[F, M, A, B] with BaseModelRW[M, F[B]]

Model reader/writer for a mapped value

Linear Supertypes
BaseModelRW[M, F[B]], ModelRW[M, F[B]], MapModelR[F, M, A, B], MappedModelR[F, M, B], BaseModelR[M, F[B]], ModelR[M, F[B]], ModelRO[F[B]], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MapModelRW
  2. BaseModelRW
  3. ModelRW
  4. MapModelR
  5. MappedModelR
  6. BaseModelR
  7. ModelR
  8. ModelRO
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MapModelRW(root: ModelR[M, M], get: (M) ⇒ F[A], f: (A) ⇒ B)(set: (M, F[B]) ⇒ M)(implicit monad: Monad[F], feq: FastEq[_ >: B])

    Permalink

Type Members

  1. type NewR[T] = ModelR[M, T]

    Permalink

    Type of a new reader returned by functions such as zoom

    Type of a new reader returned by functions such as zoom

    Definition Classes
    ModelRModelRO

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def =!=(that: F[B]): Boolean

    Permalink
    Definition Classes
    ModelRO
  4. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  5. def ===(that: F[B]): Boolean

    Permalink
    Definition Classes
    MappedModelR
  6. def apply(): F[B]

    Permalink

    Returns the value of the reader

    Returns the value of the reader

    Definition Classes
    ModelRO
  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. def eval(model: M): F[B]

    Permalink
    Definition Classes
    MappedModelR
  12. implicit val feq: FastEq[_ >: B]

    Permalink
    Definition Classes
    MapModelRMappedModelR
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def flatMap[F[_], A, B](f: (A) ⇒ F[B])(implicit ev: =:=[F[B], F[A]], monad: Monad[F], feq: FastEq[_ >: B]): NewR[F[B]]

    Permalink

    FlatMaps over current reader into a new value provided by f.

    FlatMaps over current reader into a new value provided by f. Reader type S must be of type F[A], for example Option[A].

    f

    The function to apply, must return a value of type F[B]

    Definition Classes
    ModelRO
  15. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. def map[F[_], A, B](f: (A) ⇒ B)(implicit ev: =:=[F[B], F[A]], monad: Monad[F], feq: FastEq[_ >: B]): NewR[F[B]]

    Permalink

    Maps over current reader into a new value provided by f.

    Maps over current reader into a new value provided by f. Reader type S must be of type F[A], for example Option[A].

    f

    The function to apply

    Definition Classes
    ModelRO
  19. def mapValue: F[B]

    Permalink
    Attributes
    protected
    Definition Classes
    MapModelRMappedModelR
  20. implicit val monad: Monad[F]

    Permalink
    Definition Classes
    MapModelRMappedModelR
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. val root: ModelR[M, M]

    Permalink

    Returns the root model reader of this reader

    Returns the root model reader of this reader

    Definition Classes
    MapModelRModelR
  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  26. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  27. def updated(newValue: F[B]): M

    Permalink

    Updates the model using the value provided and returns the updated model.

    Updates the model using the value provided and returns the updated model.

    Definition Classes
    BaseModelRWModelRW
  28. def updatedWith(model: M, value: F[B]): M

    Permalink

    Updates the supplied model with the value provided and returns the updated model.

    Updates the supplied model with the value provided and returns the updated model.

    Definition Classes
    MapModelRWModelRW
  29. def value: F[B]

    Permalink

    Returns the value of the reader

    Returns the value of the reader

    Definition Classes
    BaseModelRModelRO
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def zip[SS](that: ModelR[M, SS])(implicit feqS: FastEq[_ >: F[B]], feqSS: FastEq[_ >: SS]): ZipModelR[M, F[B], SS]

    Permalink

    Combines this reader with another reader to provide a new reader returning a tuple of the values of the two original readers.

    Combines this reader with another reader to provide a new reader returning a tuple of the values of the two original readers.

    that

    The other reader

    Definition Classes
    BaseModelRModelR
  34. def zoom[T](get: (F[B]) ⇒ T)(implicit feq: FastEq[_ >: T]): ZoomModelR[M, T]

    Permalink

    Zooms into the model using the provided accessor function

    Zooms into the model using the provided accessor function

    get

    Function to go from current reader to a new value

    Definition Classes
    BaseModelRModelRO
  35. def zoomFlatMap[F[_], A, B](fa: (F[B]) ⇒ F[A])(f: (A) ⇒ F[B])(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelR[M, F[B]]

    Permalink

    Zooms into the model and flatMaps over the zoomed value, which must be of type F[A]

    Zooms into the model and flatMaps over the zoomed value, which must be of type F[A]

    fa

    Zooming function

    f

    The function to apply, must return a value of type F[B]

    Definition Classes
    BaseModelRModelRO
  36. def zoomFlatMapRW[F[_], A, B](fa: (F[B]) ⇒ F[A])(f: (A) ⇒ F[B])(set: (F[B], F[B]) ⇒ F[B])(implicit monad: Monad[F], feq: FastEq[_ >: B]): FlatMapModelRW[F, M, A, B]

    Permalink

    Zooms into the model and flatMaps over the zoomed value, which must be of type F[A].

    Zooms into the model and flatMaps over the zoomed value, which must be of type F[A]. The set function is used to update the model with a new value.

    fa

    Zooming function

    f

    The function to apply

    set

    Function to update the model with a new value

    Definition Classes
    BaseModelRWModelRW
  37. def zoomMap[F[_], A, B](fa: (F[B]) ⇒ F[A])(f: (A) ⇒ B)(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelR[M, F[B]]

    Permalink

    Zooms into the model and maps over the zoomed value, which must be of type F[A]

    Zooms into the model and maps over the zoomed value, which must be of type F[A]

    fa

    Zooming function

    f

    The function to apply

    Definition Classes
    BaseModelRModelRO
  38. def zoomMapRW[F[_], A, B](fa: (F[B]) ⇒ F[A])(f: (A) ⇒ B)(set: (F[B], F[B]) ⇒ F[B])(implicit monad: Monad[F], feq: FastEq[_ >: B]): MapModelRW[F, M, A, B]

    Permalink

    Zooms into the model and maps over the zoomed value, which must be of type F[A].

    Zooms into the model and maps over the zoomed value, which must be of type F[A]. The set function is used to update the model with a new value.

    fa

    Zooming function

    f

    The function to apply

    set

    Function to update the model with a new value

    Definition Classes
    BaseModelRWModelRW
  39. def zoomRW[U](get: (F[B]) ⇒ U)(set: (F[B], U) ⇒ F[B])(implicit feq: FastEq[_ >: U]): ZoomModelRW[M, U]

    Permalink

    Zooms into the model using the provided get function.

    Zooms into the model using the provided get function. The set function is used to update the model with a new value.

    get

    Function to go from current reader to a new value

    set

    Function to update the model with a new value

    Definition Classes
    BaseModelRWModelRW
  40. macro def zoomTo[T](field: (F[B]) ⇒ T): ModelRW[M, T]

    Permalink

    An easier way to zoom into a RW model by just specifying a single chained accessor for the field.

    An easier way to zoom into a RW model by just specifying a single chained accessor for the field. This works for cases like zoomTo(_.a.b.c) but not for more complex cases such as zoomTo(_.a.b(0)). Uses a macro to generate appropriate update function.

    field

    Field to access in the model

    Definition Classes
    ModelRW

Inherited from BaseModelRW[M, F[B]]

Inherited from ModelRW[M, F[B]]

Inherited from MapModelR[F, M, A, B]

Inherited from MappedModelR[F, M, B]

Inherited from BaseModelR[M, F[B]]

Inherited from ModelR[M, F[B]]

Inherited from ModelRO[F[B]]

Inherited from AnyRef

Inherited from Any

Ungrouped