Modifier and Type | Field and Description |
---|---|
(package private) List<O> |
data
The array list to iterate over.
|
(package private) int |
pos
Current position.
|
Constructor and Description |
---|
ArrayListIter(List<O> data)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
advance()
Moves the iterator forward to the next entry.
|
void |
advance(int count)
Moves the iterator forward or backward by the given offset.
|
O |
get()
Get the current element.
|
int |
getOffset()
Get current iterator offset.
|
void |
retract()
Moves the iterator backward to the previous entry.
|
void |
seek(int off)
Moves the iterator to the given position
|
boolean |
valid()
Returns true if the iterator currently points to a valid object.
|
public boolean valid()
Iter
public void advance()
Iter
public int getOffset()
ArrayIter
public void advance(int count)
ArrayIter
public void retract()
ArrayIter
public void seek(int off)
ArrayIter
public O get()