Modifier and Type | Method and Description |
---|---|
Optional<S,A> |
asOptional()
|
Setter<S,A> |
asSetter()
|
Traversal<S,A> |
asTraversal()
|
<C,D> Prism<S,C> |
composeIso(Iso<A,C> other)
|
<C,D> Optional<S,C> |
composeLens(Lens<A,C> other)
|
<C,D> Optional<S,C> |
composeOptional(Optional<A,C> other)
|
<C> Prism<S,C> |
composePrism(Prism<A,C> other)
|
<C,D> Setter<S,C> |
composeSetter(Setter<A,C> other)
|
<C,D> Traversal<S,C> |
composeTraversal(Traversal<A,C> other)
|
Option<A> |
getOption(S s)
get the target of a
PPrism or nothing if there is no target |
Either<S,A> |
getOrModify(S s)
get the target of a
PPrism or modify the source in case there is no target |
static <S> Prism<S,S> |
id() |
static <S,A> Prism<S,A> |
prism(F<S,Option<A>> getOption,
F<A,S> reverseGet) |
S |
reverseGet(A a)
get the modified source of a
PPrism |
asFold, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, isMatching, modify, modifyEitherF, modifyFunctionF, modifyIOF, modifyListF, modifyOption, modifyOptionF, modifyP1F, modifyPromiseF, modifyStreamF, modifyTrampolineF, modifyV2F, modifyValidationF, pId, pPrism, re, set, setOption
public Either<S,A> getOrModify(S s)
PPrism
PPrism
or modify the source in case there is no targetpublic S reverseGet(A a)
PPrism
PPrism
public Option<A> getOption(S s)
PPrism
PPrism
or nothing if there is no targetpublic static <S> Prism<S,S> id()