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, wait
forEachRemaining
public SingleObjectIterator(Object object)
object
- the object to iterate overpublic boolean hasNext()
hasNext
in interface Iterator
Iterator.hasNext()
public Object next()
next
in interface Iterator
NoSuchElementException
- if the element has already been seenIterator.next()
public void remove()
remove
in interface Iterator
UnsupportedOperationException
- alwaysCopyright 2001–2022 The Jaxen Project. All rights reserved.