com.jnape.palatable.lambda.adt.hlist

## Class HList.HCons<Head,Tail extends HList>

- java.lang.Object
- - com.jnape.palatable.lambda.adt.hlist.HList
  - - com.jnape.palatable.lambda.adt.hlist.HList.HCons<Head,Tail>

- Type Parameters:
    `Head` - the head element type
    `Tail` - the HList tail type
  Direct Known Subclasses:
    SingletonHList, Tuple2, Tuple3, Tuple4, Tuple5, Tuple6, Tuple7, Tuple8
  Enclosing class:
    HList

      public static class HList.HCons<Head,Tail extends HList>
      extends HList

  The consing of a head element to a tail `HList`.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class com.jnape.palatable.lambda.adt.hlist.HList

      `HList.HCons<Head,Tail extends HList>, HList.HNil`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<NewHead> HList.HCons<NewHead,? extends HList.HCons<Head,Tail>>` | `cons(NewHead newHead)` Cons an element onto the front of this HList.
    `boolean` | `equals(Object other)`
    `int` | `hashCode()`
    `Head` | `head()` The head element of the `HList`.
    `Tail` | `tail()` The remaining tail of the `HList`; returns an HNil if this is the last element.

    - ### Methods inherited from class com.jnape.palatable.lambda.adt.hlist.HList

      `cons, nil, singletonHList, toString, tuple, tuple, tuple, tuple, tuple, tuple, tuple`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### head

          public Head head()

      The head element of the `HList`.
      Returns:
        the head element

    - #### tail

          public Tail tail()

      The remaining tail of the `HList`; returns an HNil if this is the last element.
      Returns:
        the tail

    - #### cons

          public <NewHead> HList.HCons<NewHead,? extends HList.HCons<Head,Tail>> cons(NewHead newHead)

      Description copied from class: `HList`
      Cons an element onto the front of this HList.
      Specified by:
        `cons` in class `HList`
      Type Parameters:
        `NewHead` - the new head type
      Parameters:
        `newHead` - the new head element
      Returns:
        the updated HList

    - #### equals

          public final boolean equals(Object other)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public final int hashCode()

      Overrides:
        `hashCode` in class `Object`