Package fj.data.optic
Class Prism<S,A>
- java.lang.Object
-
- fj.data.optic.PPrism<S,S,A,A>
-
- fj.data.optic.Prism<S,A>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 aPPrism
or nothing if there is no targetEither<S,A>
getOrModify(S s)
get the target of aPPrism
or modify the source in case there is no targetstatic <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 aPPrism
-
Methods inherited from class fj.data.optic.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
-
-
-
-
Method Detail
-
getOrModify
public Either<S,A> getOrModify(S s)
Description copied from class:PPrism
get the target of aPPrism
or modify the source in case there is no target
-
reverseGet
public S reverseGet(A a)
Description copied from class:PPrism
get the modified source of aPPrism
-
getOption
public Option<A> getOption(S s)
Description copied from class:PPrism
get the target of aPPrism
or nothing if there is no target
-
id
public static <S> Prism<S,S> id()
-
-