|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object | +--org.apache.commons.collections.iterators.SingletonIterator
SingletonIterator is an Iterator over a single
object instance.
| Constructor Summary | |
SingletonIterator(Object object)
Constructs a new SingletonIterator. |
|
| Method Summary | |
boolean |
hasNext()
Is another object available from the iterator. |
Object |
next()
Get the next object from the iterator. |
void |
remove()
Remove always throws UnsupportedOperationException. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SingletonIterator(Object object)
SingletonIterator.
object - the single object to return from the iterator| Method Detail |
public boolean hasNext()
This returns true if the single object hasn't been returned yet.
hasNext in interface Iteratorpublic Object next()
This returns the single object if it hasn't been returned yet.
next in interface IteratorNoSuchElementException - if the single object has already
been returnedpublic void remove()
UnsupportedOperationException.
remove in interface IteratorUnsupportedOperationException - always
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||