public final class EmptyIterator<T> extends Object implements Iterator<T>
NOTE: This class is only necessary until Java 7. Java 7's Collections
class provides an emptyIterator()
method.
TODO Remove this class when we require Java 7 to build and all supported class libraries support Java 7.
Modifier and Type | Field and Description |
---|---|
private static EmptyIterator<?> |
INSTANCE |
Modifier | Constructor and Description |
---|---|
private |
EmptyIterator()
Clients must use
getInstance() to obtain an instance. |
Modifier and Type | Method and Description |
---|---|
static <U> Iterator<U> |
getInstance() |
boolean |
hasNext() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
private static final EmptyIterator<?> INSTANCE
private EmptyIterator()
getInstance()
to obtain an instance.