Package fj.data.optic
Class Lens<S,A>
- java.lang.Object
-
- fj.data.optic.PLens<S,S,A,A>
-
- fj.data.optic.Lens<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> Lens<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> Optional<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)Aget(S s)get the target of aPLensstatic <S> Lens<S,S>id()static <S,A>
Lens<S,A>lens(F<S,A> get, F<A,F<S,S>> set)create aLensusing a pair of functions: one to get the target, one to set the target.F<S,S>modify(F<A,A> f)modify polymorphically the target of aPLensusing a function<L> F<S,Either<L,S>>modifyEitherF(F<A,Either<L,A>> f)modify polymorphically the target of aPLenswith an Applicative function<C> F<S,F<C,S>>modifyFunctionF(F<A,F<C,A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,IO<S>>modifyIOF(F<A,IO<A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,List<S>>modifyListF(F<A,List<A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,Option<S>>modifyOptionF(F<A,Option<A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,P1<S>>modifyP1F(F<A,P1<A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,Promise<S>>modifyPromiseF(F<A,Promise<A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,Stream<S>>modifyStreamF(F<A,Stream<A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,Trampoline<S>>modifyTrampolineF(F<A,Trampoline<A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,V2<S>>modifyV2F(F<A,V2<A>> f)modify polymorphically the target of aPLenswith an Applicative function<E> F<S,Validation<E,S>>modifyValidationF(F<A,Validation<E,A>> f)modify polymorphically the target of aPLenswith an Applicative functionF<S,S>set(A a)set polymorphically the target of aPLensusing a function<S1> Lens<Either<S,S1>,A>sum(Lens<S1,A> other)join twoLenswith the same target-
Methods inherited from class fj.data.optic.PLens
asFold, asGetter, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, pId, pLens, sum
-
-
-
-
Method Detail
-
set
public F<S,S> set(A a)
Description copied from class:PLensset polymorphically the target of aPLensusing a function
-
modifyFunctionF
public <C> F<S,F<C,S>> modifyFunctionF(F<A,F<C,A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyEitherF
public <L> F<S,Either<L,S>> modifyEitherF(F<A,Either<L,A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyIOF
public F<S,IO<S>> modifyIOF(F<A,IO<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyTrampolineF
public F<S,Trampoline<S>> modifyTrampolineF(F<A,Trampoline<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyPromiseF
public F<S,Promise<S>> modifyPromiseF(F<A,Promise<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyListF
public F<S,List<S>> modifyListF(F<A,List<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyOptionF
public F<S,Option<S>> modifyOptionF(F<A,Option<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyStreamF
public F<S,Stream<S>> modifyStreamF(F<A,Stream<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyP1F
public F<S,P1<S>> modifyP1F(F<A,P1<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyValidationF
public <E> F<S,Validation<E,S>> modifyValidationF(F<A,Validation<E,A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyV2F
public F<S,V2<S>> modifyV2F(F<A,V2<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modify
public F<S,S> modify(F<A,A> f)
Description copied from class:PLensmodify polymorphically the target of aPLensusing a function
-
id
public static <S> Lens<S,S> id()
-
-