|
GNU Trove | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TPrimitiveIterator
Implements all iterator functions for the hashed object set. Subclasses may override objectAtIndex to vary the object returned by calls to next() (e.g. for values, and Map.Entry objects).
Note that iteration is fastest if you forego the calls to hasNext in favor of checking the size of the structure yourself and then call next() that many times:
Iterator i = collection.iterator(); for (int size = collection.size(); size-- > 0;) { Object o = i.next(); }
You may, of course, use the hasNext(), next() idiom too if you aren't in a performance critical spot.
Method Summary | |
---|---|
boolean |
hasNext()
Returns true if the iterator can be advanced past its current location. |
void |
remove()
Removes the last entry returned by the iterator. |
Method Detail |
---|
boolean hasNext()
hasNext
in interface TIterator
boolean
valuevoid remove()
remove
in interface TIterator
|
GNU Trove | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |