|
||||||||||
| 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.SingletonIteration<E,X>
public class SingletonIteration<E,X extends Exception>
An Iteration that contains exactly one element.
| Field Summary |
|---|
| Fields inherited from class info.aduna.iteration.CloseableIterationBase |
|---|
logger |
| Constructor Summary | |
|---|---|
SingletonIteration(E value)
Creates a new EmptyIteration. |
|
| Method Summary | |
|---|---|
protected void |
handleClose()
Called by CloseableIterationBase.close() when it is called for the first time. |
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). |
| 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 SingletonIteration(E value)
| Method Detail |
|---|
public boolean hasNext()
IterationIteration.next() would return an element
rather than throwing a NoSuchElementException.)
public E next()
Iteration
public void remove()
Iteration
protected void handleClose()
throws X extends Exception
CloseableIterationBaseCloseableIterationBase.close() when it is called for the first time. This method
is only called once on each iteration. By default, this method does
nothing.
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 | |||||||||