|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
E - Object type of objects contained in the iteration.X - Exception type that is thrown when a problem occurs during iteration.public interface Iteration<E,X extends Exception>
An Iteration is a typed Iterator-like object that can throw (typed)
Exceptions while iterating. This is used in cases where the iteration is lazy
and evaluates over a (remote) connection, for example accessing a database.
In such cases an error can occur at any time and needs to be communicated
through a checked exception, something Iterator can not do
(it can only throw {@link RuntimeException)s.
Iterator| 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 iteration (optional operation). |
| Method Detail |
|---|
boolean hasNext()
throws X extends Exception
next() would return an element
rather than throwing a NoSuchElementException.)
X
X extends Exception
E next()
throws X extends Exception
NoSuchElementException - if the iteration has no more elements or if it has been closed.
X extends Exception
void remove()
throws X extends Exception
UnsupportedOperationException - if the remove operation is not supported by this Iteration.
IllegalStateException - If the Iteration has been closed, or if next() has not
yet been called, or remove() has already been called
after the last call to next().
X extends Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||