Uses of Interface
com.jnape.palatable.lambda.optics.Lens
-
Packages that use Lens Package Description com.jnape.palatable.lambda.adt.hmap com.jnape.palatable.lambda.optics com.jnape.palatable.lambda.optics.lenses -
-
Uses of Lens in com.jnape.palatable.lambda.adt.hmap
Subinterfaces of Lens in com.jnape.palatable.lambda.adt.hmap Modifier and Type Interface Description interface
Schema<Values extends HList>
A lens that focuses on theheterogeneous list
of values pointed at by one or moretypesafe keys
that must all exist in the sameHMap
to be collectively extracted. -
Uses of Lens in com.jnape.palatable.lambda.optics
Subinterfaces of Lens in com.jnape.palatable.lambda.optics Modifier and Type Interface Description static interface
Lens.Simple<S,A>
A convenience type with a simplified type signature for common lenses with both unified "larger" values and unified "smaller" values.Methods in com.jnape.palatable.lambda.optics that return Lens Modifier and Type Method Description default <C,D>
Lens<S,T,C,D>Lens. andThen(Optic<? super Cartesian<?,?,?>,? super Functor<?,?>,A,B,C,D> f)
Left-to-right composition of optics.static <S,A,B,C,D>
Lens<S,S,Tuple2<A,B>,Tuple2<C,D>>Lens. both(Lens<S,S,A,C> f, Lens<S,S,B,D> g)
Dually focus on two lenses at the same time.default <R,U>
Lens<R,U,A,B>Lens. compose(Optic<? super Cartesian<?,?,?>,? super Functor<?,?>,R,U,S,T> g)
Right-to-Left composition of optics.default <R> Lens<R,T,A,B>
Lens. contraMap(Fn1<? super R,? extends S> fn)
Contravariantly mapA <- B
.default <R,U>
Lens<R,U,A,B>Lens. diMap(Fn1<? super R,? extends S> lFn, Fn1<? super T,? extends U> rFn)
Dually map contravariantly over the left parameter and covariantly over the right parameter.default <R> Lens<R,T,A,B>
Lens. diMapL(Fn1<? super R,? extends S> fn)
Contravariantly map over the left parameter.default <U> Lens<S,U,A,B>
Lens. diMapR(Fn1<? super T,? extends U> fn)
Covariantly map over the right parameter.default <U> Lens<S,U,A,B>
Lens. discardL(Applicative<U,Lens<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.default <U> Lens<S,T,A,B>
Lens. discardR(Applicative<U,Lens<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <U> Lens<S,U,A,B>
Lens. flatMap(Fn1<? super T,? extends Monad<U,Lens<S,?,A,B>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.default <U> Lens<S,U,A,B>
Lens. fmap(Fn1<? super T,? extends U> fn)
Covariantly transmute this functor's parameter using the given mapping function.static <S,T,A,B>
Lens<S,T,A,B>Lens. lens(Fn1<? super S,? extends A> getter, Fn2<? super S,? super B,? extends T> setter)
Static factory method for creating a lens from a getter function and a setter function.static <S,T,A,B>
Lens<S,T,A,B>Lens. lens(Optic<? super Cartesian<?,?,?>,? super Functor<?,?>,S,T,A,B> optic)
Promote an optic with compatible bounds to aLens
.default <C> Lens<S,T,C,B>
Lens. mapA(Fn1<? super A,? extends C> fn)
Covariantly mapA
toC
, yielding a new optic.default <Z> Lens<S,T,A,Z>
Lens. mapB(Fn1<? super Z,? extends B> fn)
Contravariantly mapB
toZ
, yielding a new optic.default <R> Lens<R,T,A,B>
Lens. mapS(Fn1<? super R,? extends S> fn)
Contravariantly mapS
toR
, yielding a new optic.default <U> Lens<S,U,A,B>
Lens. mapT(Fn1<? super T,? extends U> fn)
Covariantly mapT
toU
, yielding a new optic.default <U> Lens<S,U,A,B>
Lens. pure(U u)
Lift the valueb
into this applicative functor.default Lens<S,T,A,B>
Iso. toLens()
default <U> Lens<S,U,A,B>
Lens. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Lens<S,?,A,B>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.default <U> Lens<S,U,A,B>
Lens. zip(Applicative<Fn1<? super T,? extends U>,Lens<S,?,A,B>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports.Methods in com.jnape.palatable.lambda.optics that return types with arguments of type Lens Modifier and Type Method Description static <S,A,B>
Pure<Lens<S,?,A,B>>Lens. pureLens(Fn1<? super S,? extends A> sa)
Methods in com.jnape.palatable.lambda.optics with parameters of type Lens Modifier and Type Method Description static <S,A,B,C,D>
Lens<S,S,Tuple2<A,B>,Tuple2<C,D>>Lens. both(Lens<S,S,A,C> f, Lens<S,S,B,D> g)
Dually focus on two lenses at the same time.static <S,A,B>
Lens.Simple<S,Tuple2<A,B>>Lens.Simple. both(Lens<S,S,A,A> f, Lens<S,S,B,B> g)
Specialization ofboth(Lens, Lens)
for simple lenses.Method parameters in com.jnape.palatable.lambda.optics with type arguments of type Lens Modifier and Type Method Description default <U> Lens<S,U,A,B>
Lens. discardL(Applicative<U,Lens<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discarding thisApplicative's
result and returningappB
.default <U> Lens<S,T,A,B>
Lens. discardR(Applicative<U,Lens<S,?,A,B>> appB)
Sequence both thisApplicative
andappB
, discardingappB's
result and returning thisApplicative
.default <U> Lens<S,U,A,B>
Lens. flatMap(Fn1<? super T,? extends Monad<U,Lens<S,?,A,B>>> f)
Chain dependent computations that may continue or short-circuit based on previous results.default <U> Lens<S,U,A,B>
Lens. trampolineM(Fn1<? super T,? extends MonadRec<RecursiveResult<T,U>,Lens<S,?,A,B>>> fn)
Given some operation yielding aRecursiveResult
inside thisMonadRec
, internally trampoline the operation until it yields atermination
instruction.default <U> Lens<S,U,A,B>
Lens. zip(Applicative<Fn1<? super T,? extends U>,Lens<S,?,A,B>> appFn)
Given another instance of this applicative over a mapping function, "zip" the two instances together using whatever application semantics the current applicative supports. -
Uses of Lens in com.jnape.palatable.lambda.optics.lenses
Methods in com.jnape.palatable.lambda.optics.lenses that return Lens Modifier and Type Method Description static <M extends java.util.Map<K,V>,K,V>
Lens<java.util.Map<K,V>,M,M,M>MapLens. asCopy(Fn1<? super java.util.Map<K,V>,? extends M> copyFn)
A lens that focuses on a copy of aMap
as a subtypeM
.static <S,T,A,B>
Lens<S,T,Maybe<A>,B>MaybeLens. liftA(Lens<S,T,A,B> lens)
Given a lens, liftA
intoMaybe
.static <S,T,A,B>
Lens<S,T,A,Maybe<B>>MaybeLens. liftB(Lens<S,T,A,B> lens, B defaultB)
static <S,T,A,B>
Lens<Maybe<S>,T,A,B>MaybeLens. liftS(Lens<S,T,A,B> lens, S defaultS)
static <S,T,A,B>
Lens<S,Maybe<T>,A,B>MaybeLens. liftT(Lens<S,T,A,B> lens)
Given a lens, liftT
intoMaybe
.static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftA(Lens<S,T,Maybe<A>,B> lens, A defaultA)
static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftB(Lens<S,T,A,Maybe<B>> lens)
static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftS(Lens<Maybe<S>,T,A,B> lens)
static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftT(Lens<S,Maybe<T>,A,B> lens, T defaultT)
static <M extends java.util.Map<K,V>,K,V>
Lens<java.util.Map<K,V>,M,Maybe<V>,Maybe<V>>MapLens. valueAt(Fn1<? super java.util.Map<K,V>,? extends M> copyFn, K k)
A lens that focuses on a value at a key in a map, as aMaybe
, and produces a subtypeM
on the way back out.Methods in com.jnape.palatable.lambda.optics.lenses with parameters of type Lens Modifier and Type Method Description static <S,T,A,B>
Lens<S,T,Maybe<A>,B>MaybeLens. liftA(Lens<S,T,A,B> lens)
Given a lens, liftA
intoMaybe
.static <S,T,A,B>
Lens<S,T,A,Maybe<B>>MaybeLens. liftB(Lens<S,T,A,B> lens, B defaultB)
static <S,T,A,B>
Lens<Maybe<S>,T,A,B>MaybeLens. liftS(Lens<S,T,A,B> lens, S defaultS)
static <S,T,A,B>
Lens<S,Maybe<T>,A,B>MaybeLens. liftT(Lens<S,T,A,B> lens)
Given a lens, liftT
intoMaybe
.static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftA(Lens<S,T,Maybe<A>,B> lens, A defaultA)
static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftB(Lens<S,T,A,Maybe<B>> lens)
static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftS(Lens<Maybe<S>,T,A,B> lens)
static <S,T,A,B>
Lens<S,T,A,B>MaybeLens. unLiftT(Lens<S,Maybe<T>,A,B> lens, T defaultT)
-