|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.aduna.iteration.CloseableIterationBase<E,X>
info.aduna.iteration.DelayedIteration<E,X>
public abstract class DelayedIteration<E,X extends Exception>
An iteration that delays the creation of the underlying iteration until it is being accessed. This is mainly useful for situations where iteration creation adds considerable overhead but where the iteration may not actually be used, or where a created iteration consumes scarce resources like JDBC-connections or memory. Subclasses must implement the createIteration method, which is called once when the iteration is first needed.
| Field Summary |
|---|
| Fields inherited from class info.aduna.iteration.CloseableIterationBase |
|---|
logger |
| Constructor Summary | |
|---|---|
DelayedIteration()
Creates a new DelayedIteration. |
|
| Method Summary | |
|---|---|
protected abstract Iteration<? extends E,? extends X> |
createIteration()
Creates the iteration that should be iterated over. |
protected void |
handleClose()
Closes this iteration as well as the underlying iteration if it has already been created and happens to be a CloseableIteration. |
boolean |
hasNext()
Calls the hasNext method of the underlying iteration. |
E |
next()
Calls the next method of the underlying iteration. |
void |
remove()
Calls the remove method of 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 DelayedIteration()
| Method Detail |
|---|
protected abstract Iteration<? extends E,? extends X> createIteration()
throws X extends Exception
X extends Exception
public boolean hasNext()
throws X extends Exception
X
X extends Exception
public E next()
throws X extends Exception
X extends Exception
public void remove()
throws X extends Exception
X extends Exception
protected void handleClose()
throws X extends Exception
CloseableIteration.
handleClose in class CloseableIterationBase<E,X extends Exception>X
X extends Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||