Package io.atlassian.fugue.optic
Class Prism<S,A>
- java.lang.Object
-
- io.atlassian.fugue.optic.PPrism<S,S,A,A>
-
- io.atlassian.fugue.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 aPPrismor nothing if there is no targetEither<S,A>getOrModify(S s)get the target of aPPrismor modify the source in case there is no targetstatic <S> Prism<S,S>id()static <S,A>
Prism<S,A>prism(java.util.function.Function<S,Option<A>> getOption, java.util.function.Function<A,S> reverseGet)SreverseGet(A a)get the modified source of aPPrism-
Methods inherited from class io.atlassian.fugue.optic.PPrism
asFold, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, isMatching, modify, modifyEitherF, modifyFunctionF, modifyIterableF, modifyOption, modifyOptionF, modifyPairF, modifySupplierF, pId, pPrism, re, set, setOption
-
-
-
-
Method Detail
-
getOrModify
public Either<S,A> getOrModify(S s)
Description copied from class:PPrismget the target of aPPrismor modify the source in case there is no target
-
reverseGet
public S reverseGet(A a)
Description copied from class:PPrismget the modified source of aPPrism
-
getOption
public Option<A> getOption(S s)
Description copied from class:PPrismget the target of aPPrismor nothing if there is no target
-
id
public static <S> Prism<S,S> id()
-
-