| 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<Pair<S,C>,Pair<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() |
Function<S,S> |
modify(Function<A,A> f)
modify polymorphically the target of a
POptional with a function |
<L> Function<S,Either<L,S>> |
modifyEitherF(Function<A,Either<L,A>> f)
modify polymorphically the target of a
POptional with an
Applicative function |
<C> Function<S,Function<C,S>> |
modifyFunctionF(Function<A,Function<C,A>> f)
modify polymorphically the target of a
POptional with an
Applicative function |
Function<S,Iterable<S>> |
modifyIterableF(Function<A,Iterable<A>> f)
modify polymorphically the target of a
POptional with an
Applicative function |
Function<S,Option<S>> |
modifyOptionF(Function<A,Option<A>> f)
modify polymorphically the target of a
POptional with an
Applicative function |
Function<S,Pair<S,S>> |
modifyPairF(Function<A,Pair<A,A>> f)
modify polymorphically the target of a
POptional with an
Applicative function |
Function<S,Supplier<S>> |
modifySupplierF(Function<A,Supplier<A>> f)
modify polymorphically the target of a
POptional with an
Applicative function |
static <S,A> Optional<S,A> |
optional(Function<S,Option<A>> getOption,
Function<A,Function<S,S>> set) |
<C> Optional<Pair<C,S>,Pair<C,A>> |
second() |
Function<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 Function<S,S> set(A a)
POptionalPOptionalpublic Function<S,Supplier<S>> modifySupplierF(Function<A,Supplier<A>> f)
POptionalPOptional with an
Applicative functionpublic Function<S,Option<S>> modifyOptionF(Function<A,Option<A>> f)
POptionalPOptional with an
Applicative functionpublic <C> Function<S,Function<C,S>> modifyFunctionF(Function<A,Function<C,A>> f)
POptionalPOptional with an
Applicative functionpublic <L> Function<S,Either<L,S>> modifyEitherF(Function<A,Either<L,A>> f)
POptionalPOptional with an
Applicative functionpublic Function<S,Iterable<S>> modifyIterableF(Function<A,Iterable<A>> f)
POptionalPOptional with an
Applicative functionpublic Function<S,Pair<S,S>> modifyPairF(Function<A,Pair<A,A>> f)
POptionalPOptional with an
Applicative functionpublic Function<S,S> modify(Function<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 final <S1> Optional<Either<S,S1>,A> sum(Optional<S1,A> other)
Optional with the same targetpublic static <S> Optional<S,S> id()
Copyright © 2018 Atlassian. All rights reserved.