|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.iteration.CloseableIterationBase<T,X>
info.aduna.iteration.ConvertingIteration<S,T,X>
public abstract class ConvertingIteration<S,T,X extends Exception>
A CloseableIteration that converts an iteration over objects of type S (the source type) to an iteration over objects of type T (the target type).
| Field Summary |
|---|
| Fields inherited from class info.aduna.iteration.CloseableIterationBase |
|---|
logger |
| Constructor Summary | |
|---|---|
ConvertingIteration(Iteration<? extends S,? extends X> iter)
Creates a new ConvertingIteration that operates on the supplied source type iteration. |
|
| Method Summary | |
|---|---|
protected abstract T |
convert(S sourceObject)
Converts a source type object to a target type object. |
protected void |
handleClose()
Closes this iteration as well as the wrapped iteration if it is a CloseableIteration. |
boolean |
hasNext()
Checks whether the source type iteration contains more elements. |
T |
next()
Returns the next element from the source type iteration. |
void |
remove()
Calls remove() on the underlying Iteration. |
| Methods inherited from class info.aduna.iteration.CloseableIterationBase |
|---|
close, isClosed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConvertingIteration(Iteration<? extends S,? extends X> iter)
iter - The source type iteration for this ConvertingIteration,
must not be null.| Method Detail |
|---|
protected abstract T convert(S sourceObject)
throws X extends Exception
X extends Exception
public boolean hasNext()
throws X extends Exception
X
X extends Exception
public T next()
throws X extends Exception
X
NoSuchElementException - If all elements have been returned.
IllegalStateException - If the iteration has been closed.
X extends Exception
public void remove()
throws X extends Exception
UnsupportedOperationException - If the wrapped Iteration does not support the remove
operation.
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
protected void handleClose()
throws X extends Exception
CloseableIteration.
handleClose in class CloseableIterationBase<T,X extends Exception>X
X extends Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||