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,?>>
-
-
Constructor Summary
Constructors Modifier Constructor Description privateZ()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Targetget(HList.HCons<Target,?> hList)Retrieve the value at this index in hList.static <Target> Index.Z<Target>instance()<L extends HList.HCons<Target,?>>
Lset(Target newElement, L hList)Set a new value of the same type at this index in anHList.
-
-
-
Field Detail
-
INSTANCE
private static final Index.Z<?> INSTANCE
-
-
Method Detail
-
get
public Target get(HList.HCons<Target,?> hList)
Description copied from class:IndexRetrieve the value at this index in hList.- Specified by:
getin classIndex<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:IndexSet a new value of the same type at this index in anHList.- Specified by:
setin classIndex<Target,HList.HCons<Target,?>>- Type Parameters:
L- the inferred tail type of the HList- Parameters:
newElement- the new valuehList- the HList- Returns:
- the updated HList
-
instance
public static <Target> Index.Z<Target> instance()
-
-