class FlatMapModelRW[F[_], M, A, B] extends FlatMapModelR[F, M, A, B] with BaseModelRW[M, F[B]]
Model reader/writer for a flatMapped value
- Alphabetic
- By Inheritance
- FlatMapModelRW
- BaseModelRW
- ModelRW
- FlatMapModelR
- MappedModelR
- BaseModelR
- ModelR
- ModelRO
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Type Members
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
def
=!=(that: F[B]): Boolean
- Definition Classes
- ModelRO
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
===(that: F[B]): Boolean
- Definition Classes
- MappedModelR
-
def
apply(): F[B]
Returns the value of the reader
Returns the value of the reader
- Definition Classes
- ModelRO
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
eval(model: M): F[B]
- Definition Classes
- MappedModelR
-
implicit
val
feq: FastEq[_ >: B]
- Definition Classes
- FlatMapModelR → MappedModelR
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
flatMap[F[_], A, B](f: (A) ⇒ F[B])(implicit ev: =:=[F[B], F[A]], monad: Monad[F], feq: FastEq[_ >: B]): NewR[F[B]]
FlatMaps over current reader into a new value provided by
f
.FlatMaps over current reader into a new value provided by
f
. Reader typeS
must be of typeF[A]
, for exampleOption[A]
.- f
The function to apply, must return a value of type
F[B]
- Definition Classes
- ModelRO
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
map[F[_], A, B](f: (A) ⇒ B)(implicit ev: =:=[F[B], F[A]], monad: Monad[F], feq: FastEq[_ >: B]): NewR[F[B]]
Maps over current reader into a new value provided by
f
.Maps over current reader into a new value provided by
f
. Reader typeS
must be of typeF[A]
, for exampleOption[A]
.- f
The function to apply
- Definition Classes
- ModelRO
-
def
mapValue: F[B]
- Attributes
- protected
- Definition Classes
- FlatMapModelR → MappedModelR
-
implicit
val
monad: Monad[F]
- Definition Classes
- FlatMapModelR → MappedModelR
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
val
root: ModelR[M, M]
Returns the root model reader of this reader
Returns the root model reader of this reader
- Definition Classes
- FlatMapModelR → ModelR
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
updated(newValue: F[B]): M
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
- BaseModelRW → ModelRW
-
def
updatedWith(model: M, value: F[B]): M
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
- FlatMapModelRW → ModelRW
-
def
value: F[B]
Returns the value of the reader
Returns the value of the reader
- Definition Classes
- BaseModelR → ModelRO
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
def
zip[SS](that: ModelR[M, SS])(implicit feqS: FastEq[_ >: F[B]], feqSS: FastEq[_ >: SS]): ZipModelR[M, F[B], SS]
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
- BaseModelR → ModelR
-
def
zoom[T](get: (F[B]) ⇒ T)(implicit feq: FastEq[_ >: T]): ZoomModelR[M, T]
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
- BaseModelR → ModelRO
-
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]]
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
- BaseModelR → ModelRO
-
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]
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]
. Theset
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
- BaseModelRW → ModelRW
-
def
zoomMap[F[_], A, B](fa: (F[B]) ⇒ F[A])(f: (A) ⇒ B)(implicit monad: Monad[F], feq: FastEq[_ >: B]): ModelR[M, F[B]]
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
- BaseModelR → ModelRO
-
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]
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]
. Theset
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
- BaseModelRW → ModelRW
-
def
zoomRW[U](get: (F[B]) ⇒ U)(set: (F[B], U) ⇒ F[B])(implicit feq: FastEq[_ >: U]): ZoomModelRW[M, U]
Zooms into the model using the provided
get
function.Zooms into the model using the provided
get
function. Theset
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
- BaseModelRW → ModelRW
-
macro
def
zoomTo[T](field: (F[B]) ⇒ T): ModelRW[M, T]
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 aszoomTo(_.a.b(0))
. Uses a macro to generate appropriate update function.- field
Field to access in the model
- Definition Classes
- ModelRW