ewe.util
Interface Iterator

All Known Implementing Classes:
IteratorEnumerator

public interface Iterator

Similar to the standard Java Iterator, it will return a set of Objects sequentially. When hasNext() returns false, there are no more Objects to retrieve.


Method Summary
 boolean hasNext()
          Returns whether there are more Objects to retrieve.
 Object next()
          Returns the next Object in the sequence.
 void remove()
          Returns the next Object in the sequence (optional operation).
 

Method Detail

hasNext

public boolean hasNext()
Returns whether there are more Objects to retrieve.


next

public Object next()
            throws NoSuchElementException
Returns the next Object in the sequence.

Returns:
the next Object in the sequence.
Throws:
NoSuchElementException - if there are no more elements left.

remove

public void remove()
Returns the next Object in the sequence (optional operation). If this operation is not supported an UnsupportedOperationException will be thrown (or a RuntimeException) on a Java 1.1 system.

Throws:
UnsupportedOperationException - if the implementation does not support this operaton