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 valuepublic 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>
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.
Modifier and Type | Method and Description |
---|---|
T |
checkedApply(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic,
Fn1<? super A,? extends B> fn,
S s) |
static <S,T,A,B> Over<S,T,A,B> |
over() |
static <S,T,A,B> Fn2<Fn1<? super A,? extends B>,S,T> |
over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic) |
static <S,T,A,B> Fn1<S,T> |
over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic,
Fn1<? super A,? extends B> fn) |
static <S,T,A,B> T |
over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic,
Fn1<? super A,? extends B> fn,
S s) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
apply, apply, apply, checkedApply, compose, contraMap, diMapL, discardR, flip, fn3, fn3, fn3, uncurry, widen
checkedApply, curried, curry, fn2, fromBiFunction, toBiFunction
public T checkedApply(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn, S s)
public static <S,T,A,B> Over<S,T,A,B> over()
public static <S,T,A,B> Fn2<Fn1<? super A,? extends B>,S,T> over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic)
public static <S,T,A,B> Fn1<S,T> over(Optic<? super Fn1<?,?>,? super Identity<?>,S,T,A,B> optic, Fn1<? super A,? extends B> fn)