Package io.atlassian.fugue.optic
Class Iso<S,A>
- java.lang.Object
-
- io.atlassian.fugue.optic.PIso<S,S,A,A>
-
- io.atlassian.fugue.optic.Iso<S,A>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Lens<S,A>asLens()Optional<S,A>asOptional()Prism<S,A>asPrism()Setter<S,A>asSetter()Traversal<S,A>asTraversal()<C> Iso<S,C>composeIso(Iso<A,C> other)<C> Lens<S,C>composeLens(Lens<A,C> other)<C> Optional<S,C>composeOptional(Optional<A,C> other)<C> Prism<S,C>composePrism(Prism<A,C> other)<C> Setter<S,C>composeSetter(Setter<A,C> other)<C> Traversal<S,C>composeTraversal(Traversal<A,C> other)<C> Iso<Pair<S,C>,Pair<A,C>>first()Aget(S s)get the target of aPIsostatic <S> Iso<S,S>id()create anIsobetween any type and itself.static <S,A>
Iso<S,A>iso(java.util.function.Function<S,A> get, java.util.function.Function<A,S> reverseGet)create anIsousing a pair of functions: one to get the target and one to get the source.<S1,A1>
Iso<Pair<S,S1>,Pair<A,A1>>product(Iso<S1,A1> other)pair two disjointIsoIso<A,S>reverse()reverse aPIso: the source becomes the target and the target becomes the sourceSreverseGet(A a)get the modified source of aPIso<C> Iso<Pair<C,S>,Pair<C,A>>second()-
Methods inherited from class io.atlassian.fugue.optic.PIso
asFold, asGetter, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, modify, modifyEitherF, modifyFunctionF, modifyIterableF, modifyOptionF, modifyPairF, modifySupplierF, pId, pIso, product, set
-
-
-
-
Method Detail
-
reverseGet
public S reverseGet(A a)
Description copied from class:PIsoget the modified source of aPIso
-
reverse
public Iso<A,S> reverse()
Description copied from class:PIsoreverse aPIso: the source becomes the target and the target becomes the source
-
product
public <S1,A1> Iso<Pair<S,S1>,Pair<A,A1>> product(Iso<S1,A1> other)
pair two disjointIso
-
iso
public static <S,A> Iso<S,A> iso(java.util.function.Function<S,A> get, java.util.function.Function<A,S> reverseGet)
create anIsousing a pair of functions: one to get the target and one to get the source.
-
-