Package io.atlassian.fugue.optic
Class Lens<S,A>
- java.lang.Object
-
- io.atlassian.fugue.optic.PLens<S,S,A,A>
-
- io.atlassian.fugue.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(java.util.function.Function<S,A> get, java.util.function.Function<A,java.util.function.Function<S,S>> set)create aLensusing a pair of functions: one to get the target, one to set the target.java.util.function.Function<S,S>modify(java.util.function.Function<A,A> f)modify polymorphically the target of aPLensusing a function<L> java.util.function.Function<S,Either<L,S>>modifyEitherF(java.util.function.Function<A,Either<L,A>> f)modify polymorphically the target of aPLenswith an Applicative function<C> java.util.function.Function<S,java.util.function.Function<C,S>>modifyFunctionF(java.util.function.Function<A,java.util.function.Function<C,A>> f)modify polymorphically the target of aPLenswith an Applicative functionjava.util.function.Function<S,java.lang.Iterable<S>>modifyIterableF(java.util.function.Function<A,java.lang.Iterable<A>> f)modify polymorphically the target of aPLenswith an Applicative functionjava.util.function.Function<S,Option<S>>modifyOptionF(java.util.function.Function<A,Option<A>> f)modify polymorphically the target of aPLenswith an Applicative functionjava.util.function.Function<S,Pair<S,S>>modifyPairF(java.util.function.Function<A,Pair<A,A>> f)modify polymorphically the target of aPLenswith an Applicative functionjava.util.function.Function<S,java.util.function.Supplier<S>>modifySupplierF(java.util.function.Function<A,java.util.function.Supplier<A>> f)modify polymorphically the target of aPLenswith an Applicative functionjava.util.function.Function<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 io.atlassian.fugue.optic.PLens
asFold, asGetter, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, pId, pLens, sum
-
-
-
-
Method Detail
-
set
public java.util.function.Function<S,S> set(A a)
Description copied from class:PLensset polymorphically the target of aPLensusing a function
-
modifyFunctionF
public <C> java.util.function.Function<S,java.util.function.Function<C,S>> modifyFunctionF(java.util.function.Function<A,java.util.function.Function<C,A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyEitherF
public <L> java.util.function.Function<S,Either<L,S>> modifyEitherF(java.util.function.Function<A,Either<L,A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyOptionF
public java.util.function.Function<S,Option<S>> modifyOptionF(java.util.function.Function<A,Option<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyIterableF
public java.util.function.Function<S,java.lang.Iterable<S>> modifyIterableF(java.util.function.Function<A,java.lang.Iterable<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifySupplierF
public java.util.function.Function<S,java.util.function.Supplier<S>> modifySupplierF(java.util.function.Function<A,java.util.function.Supplier<A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modifyPairF
public java.util.function.Function<S,Pair<S,S>> modifyPairF(java.util.function.Function<A,Pair<A,A>> f)
Description copied from class:PLensmodify polymorphically the target of aPLenswith an Applicative function
-
modify
public java.util.function.Function<S,S> modify(java.util.function.Function<A,A> f)
Description copied from class:PLensmodify polymorphically the target of aPLensusing a function
-
sum
public final <S1> Lens<Either<S,S1>,A> sum(Lens<S1,A> other)
join twoLenswith the same target
-
id
public static <S> Lens<S,S> id()
-
-