Class Over<S,T,A,B>
java.lang.Object
com.jnape.palatable.lambda.optics.functions.Over<S,T,A,B>
- Type Parameters:
S
- the type of the larger valueT
- the type of the larger updated valueA
- the type of the smaller retrieving valueB
- the type of the smaller setting value
- All Implemented Interfaces:
Fn1<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Fn1<Fn1<? super A, ? extends B>, Fn1<S, T>>> Fn2<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Fn1<? super A, ? extends B>, Fn1<S, T>> Fn3<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Fn1<? super A, ? extends B>, S, T> Applicative<Fn1<Fn1<? super A,
,? extends B>, Fn1<S, T>>, Fn1<Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B>, ?>> Cartesian<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Fn1<Fn1<? super A, ? extends B>, Fn1<S, T>>, Fn1<?, ?>> Cocartesian<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Fn1<Fn1<? super A, ? extends B>, Fn1<S, T>>, Fn1<?, ?>> Contravariant<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Profunctor<?, Fn1<Fn1<? super A, ? extends B>, Fn1<S, T>>, Fn1<?, ?>>> Functor<Fn1<Fn1<? super A,
,? extends B>, Fn1<S, T>>, Fn1<Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B>, ?>> Profunctor<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Fn1<Fn1<? super A, ? extends B>, Fn1<S, T>>, Fn1<?, ?>> Monad<Fn1<Fn1<? super A,
,? extends B>, Fn1<S, T>>, Fn1<Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B>, ?>> MonadReader<Optic<? super Fn1<?,
,?>, ? super Identity<?>, S, T, A, B>, Fn1<Fn1<? super A, ? extends B>, Fn1<S, T>>, Fn1<Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B>, ?>> MonadRec<Fn1<Fn1<? super A,
,? extends B>, Fn1<S, T>>, Fn1<Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B>, ?>> MonadWriter<Optic<? super Fn1<?,
?>, ? super Identity<?>, S, T, A, B>, Fn1<Fn1<? super A, ? extends B>, Fn1<S, T>>, Fn1<Optic<? super Fn1<?, ?>, ? super Identity<?>, S, T, A, B>, ?>>
public final class Over<S,T,A,B>
extends Object
implements Fn3<Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B>,Fn1<? super A,? extends B>,S,T>
Given an
Optic
, a function from A
to B
, and a "larger" value S
,
produce a T
by retrieving the A
from the S
, applying the function, and
updating the S
with the B
resulting from the function.
This function is similar to Set
, except that it allows the setting value B
to be derived from
S
via function application, rather than provided.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn1
andThen, carry, cartesian, censor, choose, cocartesian, diMap, diMapR, discardL, flatMap, fmap, lazyZip, listens, local, pure, self, thunk, toFunction, trampolineM, zip, zip
Methods inherited from interface com.jnape.palatable.lambda.functions.Fn2
checkedApply, toBiFunction