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, waitMethods 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.IteratorReturnstrueif the iteration has more elements. (In other words, returnstrueifIterator.next()would return an element rather than throwing an exception.) -
next
Description copied from interface:java.util.IteratorReturns the next element in the iteration.
-