public static class NullImplementation.NullEnumerator extends Object implements Enumeration, Iterator, Iterable
| Modifier and Type | Field | Description |
|---|---|---|
static NullImplementation.NullEnumerator |
INSTANCE |
Since the enumerator contains no information, only one ever has to exist.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
hasMoreElements() |
Tests if this enumeration contains more elements.
|
boolean |
hasNext() |
Returns true if the iteration has more elements.
|
Iterator |
iterator() |
Returns an Iterator instance with no values to enumerate.
|
Object |
next() |
Returns the next element in the interation.
|
Object |
nextElement() |
Returns the next element of this enumeration if this enumeration
object has at least one more element to provide.
|
void |
remove() |
Removes from the underlying Collection the last element returned by the
Iterator .
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorpublic static final NullImplementation.NullEnumerator INSTANCE
public boolean hasMoreElements()
hasMoreElements in interface Enumerationpublic Object nextElement()
nextElement in interface EnumerationNoSuchElementException - alwayspublic boolean hasNext()
public Object next()
next in interface IteratorNoSuchElementException - iteration has no more elements.public void remove()
remove in interface IteratorIllegalStateException - next has not yet been called,
or remove has already been called after the last call
to next.