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 private
Z()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Target
get(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:Index
Retrieve the value at this index in hList.- Specified by:
get
in 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:Index
Set a new value of the same type at this index in anHList
.- Specified by:
set
in 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()
-
-