- Type Parameters:
S
- the type of the larger value
T
- the type of the larger updated value (unused, but necessary for composition)
A
- the type of the smaller retrieving value
B
- the type of the smaller setting value (unused, but necessary for composition)
- All Implemented Interfaces:
Fn1<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,Fn1<S,A>>
, Fn2<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,S,A>
, Applicative<Fn1<S,A>,Fn1<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,?>>
, Cartesian<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,Fn1<S,A>,Fn1<?,?>>
, Cocartesian<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,Fn1<S,A>,Fn1<?,?>>
, Contravariant<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,Profunctor<?,Fn1<S,A>,Fn1<?,?>>>
, Functor<Fn1<S,A>,Fn1<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,?>>
, Profunctor<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,Fn1<S,A>,Fn1<?,?>>
, Monad<Fn1<S,A>,Fn1<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,?>>
, MonadReader<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,Fn1<S,A>,Fn1<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,?>>
, MonadRec<Fn1<S,A>,Fn1<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,?>>
, MonadWriter<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,Fn1<S,A>,Fn1<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,?>>
public final class View<S,T,A,B>
extends java.lang.Object
implements Fn2<Optic<? super Fn1<?,?>,? super Const<A,?>,S,T,A,B>,S,A>
Given an
Optic
and a "larger" value
S
, retrieve a "smaller" value
A
by lifting the
Optic
into the
Const
functor.
More idiomatically, this function can be used to treat a Optic
as a "getter" of A
s from
S
s.
- See Also:
Set
,
Over