abstract
class
POptional[S, T, A, B] extends AnyRef
Abstract Value Members
-
abstract
def
getMaybe(s: S): Maybe[A]
-
abstract
def
modify(f: (A) ⇒ B): (S) ⇒ T
-
abstract
def
modifyF[F[_]](f: (A) ⇒ F[B])(s: S)(implicit arg0: Applicative[F]): F[T]
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
-
final
def
##(): Int
-
final
def
==(arg0: Any): Boolean
-
final
def
^<->[C, D](other: PIso[A, B, C, D]): POptional[S, T, C, D]
-
final
def
^<-?[C, D](other: PPrism[A, B, C, D]): POptional[S, T, C, D]
-
final
def
^|->[C, D](other: PLens[A, B, C, D]): POptional[S, T, C, D]
-
final
def
^|->>[C, D](other: PTraversal[A, B, C, D]): PTraversal[S, T, C, D]
-
final
def
^|-?[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
-
final
def
asFold: Fold[S, A]
-
final
def
asInstanceOf[T0]: T0
-
final
def
asSetter: PSetter[S, T, A, B]
-
final
def
asTraversal: PTraversal[S, T, A, B]
-
def
clone(): AnyRef
-
final
def
composeFold[C](other: Fold[A, C]): Fold[S, C]
-
final
def
composeGetter[C](other: Getter[A, C]): Fold[S, C]
-
final
def
composeIso[C, D](other: PIso[A, B, C, D]): POptional[S, T, C, D]
-
final
def
composeLens[C, D](other: PLens[A, B, C, D]): POptional[S, T, C, D]
-
final
def
composeOptional[C, D](other: POptional[A, B, C, D]): POptional[S, T, C, D]
-
final
def
composePrism[C, D](other: PPrism[A, B, C, D]): POptional[S, T, C, D]
-
final
def
composeSetter[C, D](other: PSetter[A, B, C, D]): PSetter[S, T, C, D]
-
final
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
-
final
def
getClass(): Class[_]
-
val
getOrModify: (S) ⇒ \/[T, A]
-
def
hashCode(): Int
-
final
def
isInstanceOf[T0]: Boolean
-
final
def
isMatching(s: S): Boolean
-
final
def
modifyMaybe(f: (A) ⇒ B): (S) ⇒ Maybe[T]
-
final
def
ne(arg0: AnyRef): Boolean
-
final
def
notify(): Unit
-
final
def
notifyAll(): Unit
-
val
set: (B) ⇒ (S) ⇒ T
-
final
def
setMaybe(b: B): (S) ⇒ Maybe[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 POptional can be seen as a pair of functions: getOrModify: S => T \/ A set : (B, S) => T
A POptional could also be defined as a weaker PLens and weaker PPrism
POptional stands for Polymorphic Optional as it set and modify methods change a type A to B and S to T. Optional is a type alias for POptional restricted to monomoprhic updates:
type Optional[S, A] = POptional[S, S, A, A]
the source of a POptional
the modified source of a POptional
the target of a POptional
the modified target of a POptional
OptionalLaws in monocle-law module