abstract class TIterator
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected int |
_expectedSize
the number of elements this iterator believes are in the
data structure it accesses.
|
protected THash |
_hash
the data structure this iterator traverses
|
protected int |
_index
the index used for iteration.
|
| Constructor and Description |
|---|
TIterator(THash hash)
Create an instance of TIterator over the specified THash.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns true if the iterator can be advanced past its current
location.
|
protected void |
moveToNextIndex()
Sets the internal index so that the `next' object
can be returned.
|
protected abstract int |
nextIndex()
Returns the index of the next value in the data structure
or a negative value if the iterator is exhausted.
|
void |
remove()
Removes the last entry returned by the iterator.
|
protected final THash _hash
protected int _expectedSize
protected int _index
public TIterator(THash hash)
public boolean hasNext()
boolean valuepublic void remove()
protected final void moveToNextIndex()
protected abstract int nextIndex()
int value