Target
- the target element typeTargetList
- type of compatible HListpublic abstract class Index<Target,TargetList extends HList.HCons<?,?>> extends Object
Modifier and Type | Method and Description |
---|---|
<NewHead> Index<Target,HList.HCons<NewHead,? extends TargetList>> |
after()
Nest this index deeper by one element.
|
abstract Target |
get(TargetList hList)
Retrieve the value at this index in hList.
|
static <Target> Index<Target,HList.HCons<Target,?>> |
index()
Create a root index for a head value of type
Target . |
abstract <L extends TargetList> |
set(Target newElement,
L hList)
Set a new value of the same type at this index in an
HList . |
public final <NewHead> Index<Target,HList.HCons<NewHead,? extends TargetList>> after()
NewHead
- the type of the preceding elementpublic abstract Target get(TargetList hList)
hList
- the hListpublic abstract <L extends TargetList> L set(Target newElement, L hList)
HList
.L
- the inferred tail type of the HListnewElement
- the new valuehList
- the HListpublic static <Target> Index<Target,HList.HCons<Target,?>> index()
Target
.Target
- the type of the value to get