public class TIntIterator
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 int |
_index
the index used for iteration.
|
Constructor and Description |
---|
TIntIterator(TIntHash hash)
Creates a TIntIterator for the elements in the specified collection.
|
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.
|
int |
next()
Advances the iterator to the next element in the underlying collection
and returns it.
|
protected 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 int _expectedSize
protected int _index
public TIntIterator(TIntHash hash)
public int next()
NoSuchElementException
- if the iterator is already exhaustedprotected final int nextIndex()
int
valuejava.util.ConcurrentModificationException
- if the underlying collection's
size has been modified since the iterator was created.public boolean hasNext()
boolean
valuepublic void remove()
protected final void moveToNextIndex()
GNU Trove is copyright © 2001-2009 Eric D. Friedman. All Rights Reserved.