Package no.digipost.collection
Class SimpleIterator<T>
java.lang.Object
no.digipost.collection.SimpleIterator<T>
- Type Parameters:
T- The type of elements yielded by this iterator.
- All Implemented Interfaces:
Iterator<T>
SimpleIterator offers an easier way to implement the
Iterator interface, by requiring only
one method, nextIfAvailable(), to be implemented instead of both
hasNext() and next().
In addition, implementations are free to throw any exception, which,
if is a checked exception, will be rethrown wrapped in a RuntimeException.- See Also:
-
Constructor Details
-
SimpleIterator
public SimpleIterator()
-
-
Method Details
-
nextIfAvailable
-
hasNext
public final boolean hasNext() -
next
-
remove
public void remove()
-