public class SingleObjectIterator extends Object implements Iterator
| Constructor and Description |
|---|
SingleObjectIterator(Object object)
Creates a new single object iterator.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns true if this iterator's element has not yet been seen; false if it has.
|
Object |
next()
Returns the single element in this iterator if it has not yet
been seen.
|
void |
remove()
This operation is not supported.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic SingleObjectIterator(Object object)
object - the object to iterate overpublic boolean hasNext()
hasNext in interface IteratorIterator.hasNext()public Object next()
next in interface IteratorNoSuchElementException - if the element has already been seenIterator.next()public void remove()
remove in interface IteratorUnsupportedOperationException - alwaysCopyright © 2001–2016 Codehaus. All rights reserved.