com.jnape.palatable.lambda.adt.hmap

## Interface Schema<Values extends HList>

- Type Parameters:
    `Values` - the `HList` of values to focus on
  All Superinterfaces:
    Applicative<HMap,Lens<HMap,?,Maybe<Values>,Maybe<Values>>>, Contravariant<HMap,Profunctor<?,HMap,Lens<?,?,Maybe<Values>,Maybe<Values>>>>, Functor<HMap,Lens<HMap,?,Maybe<Values>,Maybe<Values>>>, Lens<HMap,HMap,Maybe<Values>,Maybe<Values>>, Lens.Simple<HMap,Maybe<Values>>, Monad<HMap,Lens<HMap,?,Maybe<Values>,Maybe<Values>>>, MonadRec<HMap,Lens<HMap,?,Maybe<Values>,Maybe<Values>>>, Optic<Cartesian<?,?,?>,Functor<?,?>,HMap,HMap,Maybe<Values>,Maybe<Values>>, Optic.Simple<Cartesian<?,?,?>,Functor<?,?>,HMap,Maybe<Values>>, Profunctor<HMap,HMap,Lens<?,?,Maybe<Values>,Maybe<Values>>>

      public interface Schema<Values extends HList>
      extends Lens.Simple<HMap,Maybe<Values>>

  A lens that focuses on the `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()`.
  See Also:
    `TypeSafeKey`

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.jnape.palatable.lambda.optics.Lens

      `Lens.Simple<S,A>`

  - ### Method Summary

    All Methods Static Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default <A,NewValues extends HList.HCons<A,Values>> Schema<NewValues>` | `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<Tuple5<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<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)` Create a `Schema` from six `TypeSafeKeys`.
    `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)` Create a `Schema` from seven `TypeSafeKeys`.
    `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)` Create a `Schema` from eight `TypeSafeKeys`.

    - ### Methods inherited from interface com.jnape.palatable.lambda.optics.Lens.Simple

      `adapt, andThen, both, compose`

    - ### Methods inherited from interface com.jnape.palatable.lambda.optics.Lens

      `andThen, both, both, compose, contraMap, diMap, diMapL, diMapR, discardL, discardR, flatMap, fmap, lens, lens, mapA, mapB, mapS, mapT, pure, pureLens, simpleLens, toIso, trampolineM, zip`

    - ### Methods inherited from interface com.jnape.palatable.lambda.monad.MonadRec

      `lazyZip`

    - ### Methods inherited from interface com.jnape.palatable.lambda.monad.Monad

      `join`

    - ### Methods inherited from interface com.jnape.palatable.lambda.functor.Functor

      `coerce`

    - ### Methods inherited from interface com.jnape.palatable.lambda.optics.Optic.Simple

      `adapt`

    - ### Methods inherited from interface com.jnape.palatable.lambda.optics.Optic

      `apply, monomorphize, optic, reframe`

- - ### Method Detail

    - #### add

          default <A,NewValues extends HList.HCons<A,Values>> Schema<NewValues> add(TypeSafeKey<?,A> key)

      Add a new `TypeSafeKey` to the head of this `Schema`.
      Type Parameters:
        `A` - the value the head key focuses on
        `NewValues` - the new `HList.HCons` of values
      Parameters:
        `key` - the new head key
      Returns:
        the updated `Schema`

    - #### schema

          static <A> Schema<SingletonHList<A>> schema(TypeSafeKey<?,A> key)

      Create a `Schema` from a single `TypeSafeKey`.
      Type Parameters:
        `A` - the type of value the key focuses on
      Parameters:
        `key` - the `TypeSafeKey`
      Returns:
        the `Schema`

    - #### schema

          static <A,B> Schema<Tuple2<A,B>> schema(TypeSafeKey<?,A> aKey,
                                                  TypeSafeKey<?,B> bKey)

      Create a `Schema` from two `TypeSafeKeys`.
      Type Parameters:
        `A` - the type of value the first key focuses on
        `B` - the type of value the second key focuses on
      Parameters:
        `aKey` - the first `TypeSafeKey`
        `bKey` - the second `TypeSafeKey`
      Returns:
        the `Schema`

    - #### schema

          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`.
      Type Parameters:
        `A` - the type of value the first key focuses on
        `B` - the type of value the second key focuses on
        `C` - the type of value the third key focuses on
      Parameters:
        `aKey` - the first `TypeSafeKey`
        `bKey` - the second `TypeSafeKey`
        `cKey` - the third `TypeSafeKey`
      Returns:
        the `Schema`

    - #### 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)

      Create a `Schema` from four `TypeSafeKeys`.
      Type Parameters:
        `A` - the type of value the first key focuses on
        `B` - the type of value the second key focuses on
        `C` - the type of value the third key focuses on
        `D` - the type of value the fourth key focuses on
      Parameters:
        `aKey` - the first `TypeSafeKey`
        `bKey` - the second `TypeSafeKey`
        `cKey` - the third `TypeSafeKey`
        `dKey` - the fourth `TypeSafeKey`
      Returns:
        the `Schema`

    - #### 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)

      Create a `Schema` from five `TypeSafeKeys`.
      Type Parameters:
        `A` - the type of value the first key focuses on
        `B` - the type of value the second key focuses on
        `C` - the type of value the third key focuses on
        `D` - the type of value the fourth key focuses on
        `E` - the type of value the fifth key focuses on
      Parameters:
        `aKey` - the first `TypeSafeKey`
        `bKey` - the second `TypeSafeKey`
        `cKey` - the third `TypeSafeKey`
        `dKey` - the fourth `TypeSafeKey`
        `eKey` - the fifth `TypeSafeKey`
      Returns:
        the `Schema`

    - #### 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)

      Create a `Schema` from six `TypeSafeKeys`.
      Type Parameters:
        `A` - the type of value the first key focuses on
        `B` - the type of value the second key focuses on
        `C` - the type of value the third key focuses on
        `D` - the type of value the fourth key focuses on
        `E` - the type of value the fifth key focuses on
        `F` - the type of value the sixth key focuses on
      Parameters:
        `aKey` - the first `TypeSafeKey`
        `bKey` - the second `TypeSafeKey`
        `cKey` - the third `TypeSafeKey`
        `dKey` - the fourth `TypeSafeKey`
        `eKey` - the fifth `TypeSafeKey`
        `fKey` - the sixth `TypeSafeKey`
      Returns:
        the `Schema`

    - #### 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)

      Create a `Schema` from seven `TypeSafeKeys`.
      Type Parameters:
        `A` - the type of value the first key focuses on
        `B` - the type of value the second key focuses on
        `C` - the type of value the third key focuses on
        `D` - the type of value the fourth key focuses on
        `E` - the type of value the fifth key focuses on
        `F` - the type of value the sixth key focuses on
        `G` - the type of value the seventh key focuses on
      Parameters:
        `aKey` - 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`
      Returns:
        the `Schema`

    - #### 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)

      Create a `Schema` from eight `TypeSafeKeys`.
      Type Parameters:
        `A` - the type of value the first key focuses on
        `B` - the type of value the second key focuses on
        `C` - the type of value the third key focuses on
        `D` - the type of value the fourth key focuses on
        `E` - the type of value the fifth key focuses on
        `F` - the type of value the sixth key focuses on
        `G` - the type of value the seventh key focuses on
        `H` - the type of value the eighth key focuses on
      Parameters:
        `aKey` - 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`
      Returns:
        the `Schema`