Overview Package Class Use Tree Deprecated Index Help
Prev Class Next Class Frames NoFrames All Classes
Summary: Nested Field Constr Method Detail: Field Constr Method
java.util
public interface Iterator<E> extends SimpleIterator<E>
This interface is a member of the Java Collections Framework.
Since: 1.2
Version: 1.20, 05/20/03
Author: Josh Bloch
See Also: Collection ListIterator Enumeration
| Method Summary | |
|---|---|
| boolean | hasNext()
Returns true if the iteration has more elements. |
| E | next()
Returns the next element in the iteration.
|
| void | remove()
Removes from the underlying collection the last element returned by the
iterator (optional operation). |
Returns: true if the iterator has more elements.
Returns: the next element in the iteration.
Throws: NoSuchElementException iteration has no more elements.
Throws: UnsupportedOperationException if the remove operation is not supported by this Iterator. IllegalStateException if the next method has not yet been called, or the remove method has already been called after the last call to the next method.