Constructor and Description |
---|
ListRange(int[] list)
Create a range with a list of indexes
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasMore()
Returns true, if more indices are available.
|
int |
index()
Consecutive numbering of current index.
|
void |
init(int lower,
int upper)
Initialize Range to available indices.
|
int |
length()
Returns the total number of indices.
|
void |
next()
Increase counter.
|
int |
value()
Get current index.
|
public ListRange(int[] list)
list
- The list of indexespublic void init(int lower, int upper)
Range
Range
is used right before the iteration.public int length()
Range
public void next()
Range
public int index()
Range
public int value()
Range