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
.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.