|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectde.unidu.is.util.SingleItemIterator
A iterator that returns only one single item.
| Field Summary | |
protected boolean |
called
Indicates if next() has ever been called. |
protected java.lang.Object |
item
The only object returned by this iterator. |
| Constructor Summary | |
SingleItemIterator(java.lang.Object item)
Creates a new iterator. |
|
| Method Summary | |
boolean |
hasNext()
Returns true if this iterator has more elements. |
java.lang.Object |
next()
Returns the next object. |
void |
remove()
Removing objects is unsupported! |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.Object item
protected boolean called
| Constructor Detail |
public SingleItemIterator(java.lang.Object item)
item - only object returned by this iterator| Method Detail |
public boolean hasNext()
hasNext in interface java.util.Iteratorpublic java.lang.Object next()
next in interface java.util.Iteratorjava.util.NoSuchElementException - if there is no object availablepublic void remove()
remove in interface java.util.Iterator
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||