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.
  • Field Details

    • tail

      private final Tail extends HList tail
  • Constructor Details

  • Method Details

    • 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