Class Index.Z<Target>

java.lang.Object
com.jnape.palatable.lambda.adt.hlist.Index<Target,HList.HCons<Target,?>>
com.jnape.palatable.lambda.adt.hlist.Index.Z<Target>
Enclosing class:
Index<Target,TargetList extends HList.HCons<?,?>>

private static final class Index.Z<Target> extends Index<Target,HList.HCons<Target,?>>
  • Field Details

    • INSTANCE

      private static final Index.Z<?> INSTANCE
  • Constructor Details

    • Z

      private Z()
  • Method Details

    • get

      public Target get(HList.HCons<Target,?> hList)
      Description copied from class: Index
      Retrieve the value at this index in hList.
      Specified by:
      get in class Index<Target,HList.HCons<Target,?>>
      Parameters:
      hList - the hList
      Returns:
      the value at this index
    • set

      public <L extends HList.HCons<Target, ?>> L set(Target newElement, L hList)
      Description copied from class: Index
      Set a new value of the same type at this index in an HList.
      Specified by:
      set in class Index<Target,HList.HCons<Target,?>>
      Type Parameters:
      L - the inferred tail type of the HList
      Parameters:
      newElement - the new value
      hList - the HList
      Returns:
      the updated HList
    • instance

      public static <Target> Index.Z<Target> instance()