Class Index.N<Target,Head,List extends HList.HCons<?,?>,PreviousIndex extends Index<Target,List>>
- java.lang.Object
-
- com.jnape.palatable.lambda.adt.hlist.Index<Target,HList.HCons<Head,? extends List>>
-
- com.jnape.palatable.lambda.adt.hlist.Index.N<Target,Head,List,PreviousIndex>
-
- Enclosing class:
- Index<Target,TargetList extends HList.HCons<?,?>>
private static final class Index.N<Target,Head,List extends HList.HCons<?,?>,PreviousIndex extends Index<Target,List>> extends Index<Target,HList.HCons<Head,? extends List>>
-
-
Field Summary
Fields Modifier and Type Field Description private PreviousIndexpreviousIndex
-
Constructor Summary
Constructors Modifier Constructor Description privateN(PreviousIndex previousIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Targetget(HList.HCons<Head,? extends List> hList)Retrieve the value at this index in hList.<L extends HList.HCons<Head,? extends List>>
Lset(Target newElement, L hList)Set a new value of the same type at this index in anHList.
-
-
-
Field Detail
-
previousIndex
private final PreviousIndex extends Index<Target,List> previousIndex
-
-
Constructor Detail
-
N
private N(PreviousIndex previousIndex)
-
-
Method Detail
-
get
public Target get(HList.HCons<Head,? extends List> hList)
Description copied from class:IndexRetrieve the value at this index in hList.- Specified by:
getin classIndex<Target,HList.HCons<Head,? extends List extends HList.HCons<?,?>>>- Parameters:
hList- the hList- Returns:
- the value at this index
-
set
public <L extends HList.HCons<Head,? extends List>> 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<Head,? extends List extends HList.HCons<?,?>>>- Type Parameters:
L- the inferred tail type of the HList- Parameters:
newElement- the new valuehList- the HList- Returns:
- the updated HList
-
-