java.lang.Object
com.ibm.j9ddr.corereaders.tdump.zebedee.util.SingletonIterator
- All Implemented Interfaces:
Iterator
This class provides an iterator with a single element.
-
Constructor Summary
ConstructorsConstructorDescriptionSingletonIterator
(Object element) Create a new SingletonIterator for the given element. -
Method Summary
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods declared in interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
SingletonIterator
Create a new SingletonIterator for the given element.
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:java.util.Iterator
Returnstrue
if the iteration has more elements. (In other words, returnstrue
ifIterator.next()
would return an element rather than throwing an exception.) -
next
Description copied from interface:java.util.Iterator
Returns the next element in the iteration.
-