| Modifier and Type | Method and Description |
|---|---|
Setter<S,A> |
asSetter()
|
Traversal<S,A> |
asTraversal()
|
<C> Optional<S,C> |
composeIso(Iso<A,C> other)
|
<C> Optional<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)
|
<C> Optional<P2<S,C>,P2<A,C>> |
first() |
Option<A> |
getOption(S s)
get the target of a
POptional or nothing if there is no target |
Either<S,A> |
getOrModify(S s)
get the target of a
POptional or modify the source in case there is no target |
static <S> Optional<S,S> |
id() |
static <S,A> Optional<S,A> |
ignored() |
F<S,S> |
modify(F<A,A> f)
modify polymorphically the target of a
POptional with a function |
<L> F<S,Either<L,S>> |
modifyEitherF(F<A,Either<L,A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
<C> F<S,F<C,S>> |
modifyFunctionF(F<A,F<C,A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,IO<S>> |
modifyIOF(F<A,IO<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,List<S>> |
modifyListF(F<A,List<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,Option<S>> |
modifyOptionF(F<A,Option<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,P1<S>> |
modifyP1F(F<A,P1<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,Promise<S>> |
modifyPromiseF(F<A,Promise<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,Stream<S>> |
modifyStreamF(F<A,Stream<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,Trampoline<S>> |
modifyTrampolineF(F<A,Trampoline<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
F<S,V2<S>> |
modifyV2F(F<A,V2<A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
<E> F<S,Validation<E,S>> |
modifyValidationF(F<A,Validation<E,A>> f)
modify polymorphically the target of a
POptional with an Applicative function |
static <S,A> Optional<S,A> |
optional(F<S,Option<A>> getOption,
F<A,F<S,S>> set) |
<C> Optional<P2<C,S>,P2<C,A>> |
second() |
F<S,S> |
set(A a)
get the modified source of a
POptional |
<S1> Optional<Either<S,S1>,A> |
sum(Optional<S1,A> other)
join two
Optional with the same target |
asFold, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, isMatching, modifyOption, pId, pOptional, setOption, sumpublic F<S,S> set(A a)
POptionalPOptionalpublic <E> F<S,Validation<E,S>> modifyValidationF(F<A,Validation<E,A>> f)
POptionalPOptional with an Applicative functionpublic F<S,V2<S>> modifyV2F(F<A,V2<A>> f)
POptionalPOptional with an Applicative functionpublic F<S,Trampoline<S>> modifyTrampolineF(F<A,Trampoline<A>> f)
POptionalPOptional with an Applicative functionpublic F<S,Stream<S>> modifyStreamF(F<A,Stream<A>> f)
POptionalPOptional with an Applicative functionpublic F<S,Promise<S>> modifyPromiseF(F<A,Promise<A>> f)
POptionalPOptional with an Applicative functionpublic F<S,P1<S>> modifyP1F(F<A,P1<A>> f)
POptionalPOptional with an Applicative functionpublic F<S,Option<S>> modifyOptionF(F<A,Option<A>> f)
POptionalPOptional with an Applicative functionpublic F<S,List<S>> modifyListF(F<A,List<A>> f)
POptionalPOptional with an Applicative functionpublic F<S,IO<S>> modifyIOF(F<A,IO<A>> f)
POptionalPOptional with an Applicative functionpublic <C> F<S,F<C,S>> modifyFunctionF(F<A,F<C,A>> f)
POptionalPOptional with an Applicative functionpublic <L> F<S,Either<L,S>> modifyEitherF(F<A,Either<L,A>> f)
POptionalPOptional with an Applicative functionpublic F<S,S> modify(F<A,A> f)
POptionalPOptional with a functionpublic Either<S,A> getOrModify(S s)
POptionalPOptional or modify the source in case there is no targetpublic Option<A> getOption(S s)
POptionalPOptional or nothing if there is no targetpublic <S1> Optional<Either<S,S1>,A> sum(Optional<S1,A> other)
Optional with the same targetpublic static <S> Optional<S,S> id()
public static <S,A> Optional<S,A> ignored()