Package fj.data.optic
Class Optional<S,A>
- java.lang.Object
-
- fj.data.optic.POptional<S,S,A,A>
-
- fj.data.optic.Optional<S,A>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 aPOptionalor nothing if there is no targetEither<S,A>getOrModify(S s)get the target of aPOptionalor modify the source in case there is no targetstatic <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 aPOptionalwith a function<L> F<S,Either<L,S>>modifyEitherF(F<A,Either<L,A>> f)modify polymorphically the target of aPOptionalwith an Applicative function<C> F<S,F<C,S>>modifyFunctionF(F<A,F<C,A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,IO<S>>modifyIOF(F<A,IO<A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,List<S>>modifyListF(F<A,List<A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,Option<S>>modifyOptionF(F<A,Option<A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,P1<S>>modifyP1F(F<A,P1<A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,Promise<S>>modifyPromiseF(F<A,Promise<A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,Stream<S>>modifyStreamF(F<A,Stream<A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,Trampoline<S>>modifyTrampolineF(F<A,Trampoline<A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionF<S,V2<S>>modifyV2F(F<A,V2<A>> f)modify polymorphically the target of aPOptionalwith an Applicative function<E> F<S,Validation<E,S>>modifyValidationF(F<A,Validation<E,A>> f)modify polymorphically the target of aPOptionalwith an Applicative functionstatic <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 aPOptional<S1> Optional<Either<S,S1>,A>sum(Optional<S1,A> other)join twoOptionalwith the same target-
Methods inherited from class fj.data.optic.POptional
asFold, composeFold, composeGetter, composeIso, composeLens, composeOptional, composePrism, composeSetter, composeTraversal, isMatching, modifyOption, pId, pOptional, setOption, sum
-
-
-
-
Method Detail
-
set
public F<S,S> set(A a)
Description copied from class:POptionalget the modified source of aPOptional
-
modifyValidationF
public <E> F<S,Validation<E,S>> modifyValidationF(F<A,Validation<E,A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyV2F
public F<S,V2<S>> modifyV2F(F<A,V2<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyTrampolineF
public F<S,Trampoline<S>> modifyTrampolineF(F<A,Trampoline<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyStreamF
public F<S,Stream<S>> modifyStreamF(F<A,Stream<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyPromiseF
public F<S,Promise<S>> modifyPromiseF(F<A,Promise<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyP1F
public F<S,P1<S>> modifyP1F(F<A,P1<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyOptionF
public F<S,Option<S>> modifyOptionF(F<A,Option<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyListF
public F<S,List<S>> modifyListF(F<A,List<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyIOF
public F<S,IO<S>> modifyIOF(F<A,IO<A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyFunctionF
public <C> F<S,F<C,S>> modifyFunctionF(F<A,F<C,A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modifyEitherF
public <L> F<S,Either<L,S>> modifyEitherF(F<A,Either<L,A>> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith an Applicative function
-
modify
public F<S,S> modify(F<A,A> f)
Description copied from class:POptionalmodify polymorphically the target of aPOptionalwith a function
-
getOrModify
public Either<S,A> getOrModify(S s)
Description copied from class:POptionalget the target of aPOptionalor modify the source in case there is no target
-
getOption
public Option<A> getOption(S s)
Description copied from class:POptionalget the target of aPOptionalor nothing if there is no target
-
sum
public <S1> Optional<Either<S,S1>,A> sum(Optional<S1,A> other)
join twoOptionalwith the same target
-
id
public static <S> Optional<S,S> id()
-
ignored
public static <S,A> Optional<S,A> ignored()
-
-