Package fj.data.optic
Class Iso<S,A>
- java.lang.Object
-
- fj.data.optic.PIso<S,S,A,A>
-
- fj.data.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<P2<S,C>,P2<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(F<S,A> get, F<A,S> reverseGet)create anIsousing a pair of functions: one to get the target and one to get the source.<S1,A1>
Iso<P2<S,S1>,P2<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<P2<C,S>,P2<C,A>>second()-
Methods inherited from class fj.data.optic.PIso
asFold, asGetter, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, modify, modifyEitherF, modifyFunctionF, modifyIOF, modifyListF, modifyOptionF, modifyP1F, modifyPromiseF, modifyStreamF, modifyTrampolineF, modifyV2F, modifyValidationF, 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
-
iso
public static <S,A> Iso<S,A> iso(F<S,A> get, F<A,S> reverseGet)
create anIsousing a pair of functions: one to get the target and one to get the source.
-
-