public interface DBIDIter
for (DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
iter.getDBID();
}
We list some fundamental differences.
iter.valid()
refers to the current element,
Iterator.next()
to the next.iter.advance()
does not return an element. Use
get...
to access it.DBIDIter.get...
do not advance the iterator.Modifier and Type | Method and Description |
---|---|
void |
advance()
Moves the iterator forward to the next entry.
|
DBID |
getDBID()
Get the current DBID.
|
int |
getIntegerID()
Return the integer value of the object ID, if possible.
|
boolean |
valid()
Returns true if the iterator currently points to a valid object.
|
boolean valid()
boolean
valuevoid advance()
NoSuchElementException
- if the iterator is already
exhaustedint getIntegerID()
DBID getDBID()