- All Implemented Interfaces:
Iterator<E>
public class SingletonIterator<E>
extends Object
implements Iterator<E>
An iterator that contains exactly one element.
-
Constructor Summary
Constructors
Creates a new EmptyIterator.
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SingletonIterator
public SingletonIterator(E value)
Creates a new EmptyIterator.
-