T
- the element typepublic interface Enumerator<T>
next()
to
advance the iteration and current()
to return the current element. An example
from normal Java for such
kind of iteration is the java.sql.ResultSet
.Modifier and Type | Method and Description |
---|---|
T |
current()
Returns the current element.
|
boolean |
next()
Tries to move to the next element.
|
boolean next()
T current()
next()
method, or the enumeration has already finished and next()
returned false, a NoSuchElementException
is thrown.
Other than these, this method should not throw any exception.