Uses of Interface
com.jnape.palatable.lambda.optics.Lens.Simple
Packages that use Lens.Simple
Package
Description
-
Uses of Lens.Simple in com.jnape.palatable.lambda.adt.hmap
Subinterfaces of Lens.Simple in com.jnape.palatable.lambda.adt.hmapModifier and TypeInterfaceDescriptioninterface
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.Simple in com.jnape.palatable.lambda.optics
Methods in com.jnape.palatable.lambda.optics that return Lens.SimpleModifier and TypeMethodDescriptionstatic <S,
A> Lens.Simple <S, A> Adapt aLens
with the right variance to aLens.Simple
.default <B> Lens.Simple
<S, B> Lens.Simple.andThen
(Optic.Simple<? super Cartesian<?, ?, ?>, ? super Functor<?, ?>, A, B> f) Compose two simple optics from left to right.static <S,
A, B> Lens.Simple <S, Tuple2<A, B>> Lens.both
(Lens.Simple<S, A> f, Lens.Simple<S, B> g) Dually focus on two simple lenses at the same time.static <S,
A, B> Lens.Simple <S, Tuple2<A, B>> Specialization ofLens.both(Lens, Lens)
for simple lenses.default <R> Lens.Simple
<R, A> Lens.Simple.compose
(Optic.Simple<? super Cartesian<?, ?, ?>, ? super Functor<?, ?>, R, S> g) Compose two simple optics from right to left.static <S,
A> Lens.Simple <S, A> Lens.simpleLens
(Fn1<? super S, ? extends A> getter, Fn2<? super S, ? super A, ? extends S> setter) Static factory method for creating a simple lens from a getter function and a setter function.default Lens.Simple
<S, A> Iso.Simple.toLens()
Methods in com.jnape.palatable.lambda.optics with parameters of type Lens.SimpleModifier and TypeMethodDescriptionstatic <S,
A, B> Lens.Simple <S, Tuple2<A, B>> Lens.both
(Lens.Simple<S, A> f, Lens.Simple<S, B> g) Dually focus on two simple lenses at the same time. -
Uses of Lens.Simple in com.jnape.palatable.lambda.optics.lenses
Methods in com.jnape.palatable.lambda.optics.lenses that return Lens.SimpleModifier and TypeMethodDescriptionstatic <L,
R> Lens.Simple <Either<L, R>, Maybe<L>> EitherLens._left()
Convenience static factory method for creating a lens over left values, wrapping them in aMaybe
.static <L,
R> Lens.Simple <Either<L, R>, Maybe<R>> EitherLens._right()
Convenience static factory method for creating a lens over right values, wrapping them in aMaybe
.static <X,
CX extends Collection<X>>
Lens.Simple<CX, CX> Convenience static factory method for creating a lens that focuses on a copy of aCollection
, given a function that creates the copy.static <X> Lens.Simple
<List<X>, List<X>> ListLens.asCopy()
Convenience static factory method for creating a lens over a copy of a list.static <K,
V> Lens.Simple <Map<K, V>, Map<K, V>> MapLens.asCopy()
A lens that focuses on a copy of a Map.static <V> Lens.Simple
<V, Maybe<V>> MaybeLens.asMaybe()
Convenience static factory method for creating a lens that focuses on a value as aMaybe
.static <X,
CX extends Collection<X>>
Lens.Simple<CX, Set<X>> Convenience static factory method for creating a lens that focuses on an arbitraryCollection
as aSet
.static <X,
CX extends Collection<X>>
Lens.Simple<CX, Stream<X>> Convenience static factory method for creating a lens that focuses on a Collection as a Stream.static <A> Lens.Simple
<Set<A>, Boolean> SetLens.contains
(A a) A lens that focuses on whether aSet
contains some valuea
.static <A,
SetA extends Set<A>>
Lens.Simple<SetA, Boolean> A lens that focuses on whether aSet
contains some valuea
.static <E,
List extends HList.HCons<?, ?>>
Lens.Simple<List, E> static <X> Lens.Simple
<List<X>, Maybe<X>> ListLens.elementAt
(int index) Convenience static factory method for creating a lens that focuses on an element in a list at a particular index.static <X> Lens.Simple
<List<X>, X> ListLens.elementAt
(int index, X defaultValue) Convenience static factory method for creating a lens that focuses on an element in a list at a particular index, returningdefaultValue
if there is no value at that index.static <Head,
Tail extends HList>
Lens.Simple<HList.HCons<Head, ? extends Tail>, Head> HListLens.head()
Focus on the head of anHList
.static <A> Lens.Simple
<Iterable<A>, Maybe<A>> IterableLens.head()
A lens focusing on the head of a givenIterable
.static <K,
V> Lens.Simple <Map<K, V>, Map<V, K>> MapLens.inverted()
A lens that focuses on the inverse of a map (keys and values swapped).static <K,
V> Lens.Simple <Map<K, V>, Set<K>> MapLens.keys()
A lens that focuses on the keys of a map.static <K,
V, V2> Lens.Simple <Map<K, V>, Map<K, V2>> MapLens.mappingValues
(Iso<V, V, V2, V2> iso) A lens that focuses on a map while mapping its values with the mappingIso
.static <Head,
Tail extends HList>
Lens.Simple<HList.HCons<Head, ? extends Tail>, Tail> HListLens.tail()
Focus on the tail of anHList
.static <A> Lens.Simple
<Iterable<A>, Iterable<A>> IterableLens.tail()
A lens focusing on the tail of anIterable
.static <A> Lens.Simple
<HMap, Maybe<A>> HMapLens.valueAt
(TypeSafeKey<?, A> key) static <K,
V> Lens.Simple <Map<K, V>, Maybe<V>> MapLens.valueAt
(K k) A lens that focuses on a value at a key in a map, as aMaybe
.static <K,
V> Lens.Simple <Map<K, V>, V> MapLens.valueAt
(K k, V defaultValue) A lens that focuses on a value at a key in a map, falling back todefaultV
if the value is missing.static <K,
V> Lens.Simple <Map<K, V>, Collection<V>> MapLens.values()
A lens that focuses on the values of a map.