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>
PIso
when S = T and A = B-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasLens()
asPrism()
asSetter()
composeIso
(Iso<A, C> other) composeLens
(Lens<A, C> other) composeOptional
(Optional<A, C> other) composePrism
(Prism<A, C> other) composeSetter
(Setter<A, C> other) composeTraversal
(Traversal<A, C> other) first()
get the target of aPIso
static <S> Iso
<S, S> id()
create anIso
between any type and itself.static <S,
A> Iso <S, A> create anIso
using a pair of functions: one to get the target and one to get the source.pair two disjointIso
reverse()
reverse aPIso
: the source becomes the target and the target becomes the sourcereverseGet
(A a) get the modified source of aPIso
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
-
Field Details
-
pIso
-
-
Constructor Details
-
Iso
-
-
Method Details
-
get
Description copied from class:PIso
get the target of aPIso
-
reverseGet
Description copied from class:PIso
get the modified source of aPIso
-
reverse
Description copied from class:PIso
reverse aPIso
: the source becomes the target and the target becomes the source -
product
pair two disjointIso
-
first
-
second
-
composeSetter
-
composeTraversal
-
composeOptional
-
composePrism
-
composeLens
-
composeIso
-
asSetter
-
asTraversal
-
asOptional
-
asPrism
-
asLens
-
iso
create anIso
using a pair of functions: one to get the target and one to get the source. -
id
create anIso
between any type and itself. id is the zero element of optics composition, for all optics o of type O (e.g. Lens, Iso, Prism, ...):
(replace composeO by composeLens, composeIso, composePrism, ...)o composeIso Iso.id == o Iso.id composeO o == o
-