java.util
public interface Iterator<E>
Since: 1.2
See Also: Collection ListIterator Enumeration
UNKNOWN: updated to 1.4
Method Summary | |
---|---|
boolean | hasNext()
Tests whether there are elements remaining in the collection. |
E | next()
Obtain the next element in the collection.
|
void | remove()
Remove from the underlying collection the last element returned by next
(optional operation). |
next()
will not throw an exception.
Returns: true if there is at least one more element in the collection
Returns: the next element in the collection
Throws: NoSuchElementException if there are no more elements
next()
. It does not affect what will be returned
by subsequent calls to next.
Throws: IllegalStateException if next has not yet been called or remove has already been called since the last call to next. UnsupportedOperationException if this Iterator does not support the remove operation.