Modifier and Type | Method and 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)
|
A |
get(S s)
get the target of a
PLens |
static <S> Lens<S,S> |
id() |
static <S,A> Lens<S,A> |
lens(F<S,A> get,
F<A,F<S,S>> set)
create a
Lens using 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 a
PLens using a function |
<L> F<S,Either<L,S>> |
modifyEitherF(F<A,Either<L,A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
<C> F<S,F<C,S>> |
modifyFunctionF(F<A,F<C,A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,IO<S>> |
modifyIOF(F<A,IO<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,List<S>> |
modifyListF(F<A,List<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,Option<S>> |
modifyOptionF(F<A,Option<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,P1<S>> |
modifyP1F(F<A,P1<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,Promise<S>> |
modifyPromiseF(F<A,Promise<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,Stream<S>> |
modifyStreamF(F<A,Stream<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,Trampoline<S>> |
modifyTrampolineF(F<A,Trampoline<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,V2<S>> |
modifyV2F(F<A,V2<A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
<E> F<S,Validation<E,S>> |
modifyValidationF(F<A,Validation<E,A>> f)
modify polymorphically the target of a
PLens with an Applicative function |
F<S,S> |
set(A a)
set polymorphically the target of a
PLens using a function |
<S1> Lens<Either<S,S1>,A> |
sum(Lens<S1,A> other)
join two
Lens with the same target |
asFold, asGetter, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, pId, pLens, sum
public F<S,S> set(A a)
PLens
PLens
using a functionpublic <C> F<S,F<C,S>> modifyFunctionF(F<A,F<C,A>> f)
PLens
PLens
with an Applicative functionpublic <L> F<S,Either<L,S>> modifyEitherF(F<A,Either<L,A>> f)
PLens
PLens
with an Applicative functionpublic F<S,IO<S>> modifyIOF(F<A,IO<A>> f)
PLens
PLens
with an Applicative functionpublic F<S,Trampoline<S>> modifyTrampolineF(F<A,Trampoline<A>> f)
PLens
PLens
with an Applicative functionpublic F<S,Promise<S>> modifyPromiseF(F<A,Promise<A>> f)
PLens
PLens
with an Applicative functionpublic F<S,List<S>> modifyListF(F<A,List<A>> f)
PLens
PLens
with an Applicative functionpublic F<S,Option<S>> modifyOptionF(F<A,Option<A>> f)
PLens
PLens
with an Applicative functionpublic F<S,Stream<S>> modifyStreamF(F<A,Stream<A>> f)
PLens
PLens
with an Applicative functionpublic F<S,P1<S>> modifyP1F(F<A,P1<A>> f)
PLens
PLens
with an Applicative functionpublic <E> F<S,Validation<E,S>> modifyValidationF(F<A,Validation<E,A>> f)
PLens
PLens
with an Applicative functionpublic F<S,V2<S>> modifyV2F(F<A,V2<A>> f)
PLens
PLens
with an Applicative functionpublic F<S,S> modify(F<A,A> f)
PLens
PLens
using a functionpublic static final <S> Lens<S,S> id()