final
class
PLens[S, T, A, B] extends AnyRef
Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
def
^<->[C, D](other: PIso[A, B, C, D]): PLens[S, T, C, D]
-
def
^<-?[C, D](other: PPrism[A, B, C, D]): POptional[S, T, C, D]
-
def
^|->[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]
-
def
^|->>[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]
-
def
^|-?[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
-
def
asFold: Fold[S, A]
-
def
asGetter: Getter[S, A]
-
final
def
asInstanceOf[T0]: T0
-
def
asOptional: POptional[S, T, A, B]
-
def
asSetter: PSetter[S, T, A, B]
-
def
asTraversal: PTraversal[S, T, A, B]
-
def
clone(): AnyRef
-
def
composeFold[C](other: Fold[A, C]): Fold[S, C]
-
def
composeGetter[C](other: Getter[A, C]): Getter[S, C]
-
def
composeIso[C, D](other: PIso[A, B, C, D]): PLens[S, T, C, D]
-
def
composeLens[C, D](other: PLens[A, B, C, D]): PLens[S, T, C, D]
-
def
composeOptional[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
-
def
composePrism[C, D](other: PPrism[A, B, C, D]): POptional[S, T, C, D]
-
def
composeSetter[C, D](other: PSetter[A, B, C, D]): PSetter[S, T, C, D]
-
def
composeTraversal[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]
-
final
def
eq(arg0: AnyRef): Boolean
-
def
equals(arg0: Any): Boolean
-
def
finalize(): Unit
-
val
get: (S) ⇒ A
-
final
def
getClass(): Class[_]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
def
modify(f: (A) ⇒ B): (S) ⇒ T
-
def
modifyF[F[_]](f: (A) ⇒ F[B])(s: S)(implicit arg0: Functor[F]): F[T]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
val
set: (B) ⇒ (S) ⇒ T
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
-
def
toString(): String
-
final
def
wait(): Unit
-
final
def
wait(arg0: Long, arg1: Int): Unit
-
final
def
wait(arg0: Long): Unit
Inherited from AnyRef
Inherited from Any
A PLens can be seen as a pair of functions: get: S => A i.e. from an S, we can extract an A set: (B, S) => T i.e. if we replace an A by a B in a S, we obtain a T
A PLens could also be defined as a weaker PIso where set requires an additional parameter than reverseGet.
PLens stands for Polymorphic Lens as it set and modify methods change a type A to B and S to T. Lens is a type alias for PLens restricted to monomoprhic updates:
type Lens[S, A] = PLens[S, S, A, A]
A PLens is also a valid Getter, Fold, POptional, PTraversal and PSetter
Typically a PLens or Lens can be defined between a Product (e.g. case class, tuple, HList) and one of it is component.
the source of a PLens
the modified source of a PLens
the target of a PLens
the modified target of a PLens
LensLaws in monocle-law module