Values
- the HList
of values to focus onpublic interface Schema<Values extends HList> extends Lens.Simple<HMap,Maybe<Values>>
heterogeneous list
of values pointed at by one or more
typesafe keys
that must all exist in the same HMap
to be collectively extracted. Note
that if any of the keys is absent in the map, the result will be Maybe.nothing()
.TypeSafeKey
Lens.Simple<S,A>
Modifier and Type | Method and Description |
---|---|
default <A,NewValues extends HList.HCons<A,Values>> |
add(TypeSafeKey<?,A> key)
Add a new
TypeSafeKey to the head of this Schema . |
static <A> Schema<SingletonHList<A>> |
schema(TypeSafeKey<?,A> key)
Create a
Schema from a single TypeSafeKey . |
static <A,B> Schema<Tuple2<A,B>> |
schema(TypeSafeKey<?,A> aKey,
TypeSafeKey<?,B> bKey)
Create a
Schema from two TypeSafeKeys . |
static <A,B,C> Schema<Tuple3<A,B,C>> |
schema(TypeSafeKey<?,A> aKey,
TypeSafeKey<?,B> bKey,
TypeSafeKey<?,C> cKey)
Create a
Schema from three TypeSafeKeys . |
static <A,B,C,D> Schema<Tuple4<A,B,C,D>> |
schema(TypeSafeKey<?,A> aKey,
TypeSafeKey<?,B> bKey,
TypeSafeKey<?,C> cKey,
TypeSafeKey<?,D> dKey)
Create a
Schema from four TypeSafeKeys . |
static <A,B,C,D,E> |
schema(TypeSafeKey<?,A> aKey,
TypeSafeKey<?,B> bKey,
TypeSafeKey<?,C> cKey,
TypeSafeKey<?,D> dKey,
TypeSafeKey<?,E> eKey)
Create a
Schema from five TypeSafeKeys . |
static <A,B,C,D,E,F> |
schema(TypeSafeKey<?,A> aKey,
TypeSafeKey<?,B> bKey,
TypeSafeKey<?,C> cKey,
TypeSafeKey<?,D> dKey,
TypeSafeKey<?,E> eKey,
TypeSafeKey<?,F> fKey)
Create a
Schema from six TypeSafeKeys . |
static <A,B,C,D,E,F,G> |
schema(TypeSafeKey<?,A> aKey,
TypeSafeKey<?,B> bKey,
TypeSafeKey<?,C> cKey,
TypeSafeKey<?,D> dKey,
TypeSafeKey<?,E> eKey,
TypeSafeKey<?,F> fKey,
TypeSafeKey<?,G> gKey)
Create a
Schema from seven TypeSafeKeys . |
static <A,B,C,D,E,F,G,H> |
schema(TypeSafeKey<?,A> aKey,
TypeSafeKey<?,B> bKey,
TypeSafeKey<?,C> cKey,
TypeSafeKey<?,D> dKey,
TypeSafeKey<?,E> eKey,
TypeSafeKey<?,F> fKey,
TypeSafeKey<?,G> gKey,
TypeSafeKey<?,H> hKey)
Create a
Schema from eight TypeSafeKeys . |
adapt, andThen, both, compose
andThen, both, both, compose, contraMap, diMap, diMapL, diMapR, discardL, discardR, flatMap, fmap, lens, lens, mapA, mapB, mapS, mapT, pure, pureLens, simpleLens, toIso, trampolineM, zip
adapt
apply, monomorphize, optic, reframe
default <A,NewValues extends HList.HCons<A,Values>> Schema<NewValues> add(TypeSafeKey<?,A> key)
TypeSafeKey
to the head of this Schema
.A
- the value the head key focuses onNewValues
- the new HList.HCons
of valueskey
- the new head keySchema
static <A> Schema<SingletonHList<A>> schema(TypeSafeKey<?,A> key)
Schema
from a single TypeSafeKey
.A
- the type of value the key focuses onkey
- the TypeSafeKey
Schema
static <A,B> Schema<Tuple2<A,B>> schema(TypeSafeKey<?,A> aKey, TypeSafeKey<?,B> bKey)
Schema
from two TypeSafeKeys
.A
- the type of value the first key focuses onB
- the type of value the second key focuses onaKey
- the first TypeSafeKey
bKey
- the second TypeSafeKey
Schema
static <A,B,C> Schema<Tuple3<A,B,C>> schema(TypeSafeKey<?,A> aKey, TypeSafeKey<?,B> bKey, TypeSafeKey<?,C> cKey)
Schema
from three TypeSafeKeys
.A
- the type of value the first key focuses onB
- the type of value the second key focuses onC
- the type of value the third key focuses onaKey
- the first TypeSafeKey
bKey
- the second TypeSafeKey
cKey
- the third TypeSafeKey
Schema
static <A,B,C,D> Schema<Tuple4<A,B,C,D>> schema(TypeSafeKey<?,A> aKey, TypeSafeKey<?,B> bKey, TypeSafeKey<?,C> cKey, TypeSafeKey<?,D> dKey)
Schema
from four TypeSafeKeys
.A
- the type of value the first key focuses onB
- the type of value the second key focuses onC
- the type of value the third key focuses onD
- the type of value the fourth key focuses onaKey
- the first TypeSafeKey
bKey
- the second TypeSafeKey
cKey
- the third TypeSafeKey
dKey
- the fourth TypeSafeKey
Schema
static <A,B,C,D,E> Schema<Tuple5<A,B,C,D,E>> schema(TypeSafeKey<?,A> aKey, TypeSafeKey<?,B> bKey, TypeSafeKey<?,C> cKey, TypeSafeKey<?,D> dKey, TypeSafeKey<?,E> eKey)
Schema
from five TypeSafeKeys
.A
- the type of value the first key focuses onB
- the type of value the second key focuses onC
- the type of value the third key focuses onD
- the type of value the fourth key focuses onE
- the type of value the fifth key focuses onaKey
- the first TypeSafeKey
bKey
- the second TypeSafeKey
cKey
- the third TypeSafeKey
dKey
- the fourth TypeSafeKey
eKey
- the fifth TypeSafeKey
Schema
static <A,B,C,D,E,F> Schema<Tuple6<A,B,C,D,E,F>> schema(TypeSafeKey<?,A> aKey, TypeSafeKey<?,B> bKey, TypeSafeKey<?,C> cKey, TypeSafeKey<?,D> dKey, TypeSafeKey<?,E> eKey, TypeSafeKey<?,F> fKey)
Schema
from six TypeSafeKeys
.A
- the type of value the first key focuses onB
- the type of value the second key focuses onC
- the type of value the third key focuses onD
- the type of value the fourth key focuses onE
- the type of value the fifth key focuses onF
- the type of value the sixth key focuses onaKey
- the first TypeSafeKey
bKey
- the second TypeSafeKey
cKey
- the third TypeSafeKey
dKey
- the fourth TypeSafeKey
eKey
- the fifth TypeSafeKey
fKey
- the sixth TypeSafeKey
Schema
static <A,B,C,D,E,F,G> Schema<Tuple7<A,B,C,D,E,F,G>> schema(TypeSafeKey<?,A> aKey, TypeSafeKey<?,B> bKey, TypeSafeKey<?,C> cKey, TypeSafeKey<?,D> dKey, TypeSafeKey<?,E> eKey, TypeSafeKey<?,F> fKey, TypeSafeKey<?,G> gKey)
Schema
from seven TypeSafeKeys
.A
- the type of value the first key focuses onB
- the type of value the second key focuses onC
- the type of value the third key focuses onD
- the type of value the fourth key focuses onE
- the type of value the fifth key focuses onF
- the type of value the sixth key focuses onG
- the type of value the seventh key focuses onaKey
- the first TypeSafeKey
bKey
- the second TypeSafeKey
cKey
- the third TypeSafeKey
dKey
- the fourth TypeSafeKey
eKey
- the fifth TypeSafeKey
fKey
- the sixth TypeSafeKey
gKey
- the seventh TypeSafeKey
Schema
static <A,B,C,D,E,F,G,H> Schema<Tuple8<A,B,C,D,E,F,G,H>> schema(TypeSafeKey<?,A> aKey, TypeSafeKey<?,B> bKey, TypeSafeKey<?,C> cKey, TypeSafeKey<?,D> dKey, TypeSafeKey<?,E> eKey, TypeSafeKey<?,F> fKey, TypeSafeKey<?,G> gKey, TypeSafeKey<?,H> hKey)
Schema
from eight TypeSafeKeys
.A
- the type of value the first key focuses onB
- the type of value the second key focuses onC
- the type of value the third key focuses onD
- the type of value the fourth key focuses onE
- the type of value the fifth key focuses onF
- the type of value the sixth key focuses onG
- the type of value the seventh key focuses onH
- the type of value the eighth key focuses onaKey
- the first TypeSafeKey
bKey
- the second TypeSafeKey
cKey
- the third TypeSafeKey
dKey
- the fourth TypeSafeKey
eKey
- the fifth TypeSafeKey
fKey
- the sixth TypeSafeKey
gKey
- the seventh TypeSafeKey
hKey
- the eighth TypeSafeKey
Schema