java.lang.Object | +--org.apache.commons.collections.iterators.SingletonIteratorAll Implemented Interfaces:
SingletonIterator(Object object) Constructs a new SingletonIterator. |
boolean | hasNext() Is another object available from the iterator? This returns true if the single object hasn't been returned yet. |
Object | next() Get the next object from the iterator. |
void | remove() Remove the object from this iterator. |
void | reset() Reset the iterator to the start. |
public SingletonIterator(Object object)
SingletonIterator
.
public boolean hasNext()
public Object next()
- if the single object has already
been returnedpublic void remove()
- if the next method has not
yet been called, or the remove method has already
been called after the last call to the next
method.public void reset()
SingletonIterator
is an Iterator over a single object instance.