Constructor and Description |
---|
EmptyIterator() |
Modifier and Type | Method and Description |
---|---|
static <E> EmptyIterator<E> |
get()
Gets a singleton instance of the empty iterator.
|
boolean |
hasNext()
Always returns false, since this iterator is empty.
|
Iterator<E> |
iterator() |
E |
next()
Always throws a
NoSuchElementException . |
void |
remove()
Throws a
UnsupportedOperationException . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
forEach, spliterator
public static <E> EmptyIterator<E> get()
E
- The type of the objects (not) returned by the iterator.public boolean hasNext()
hasNext
in interface Iterator<E>
Iterator.hasNext()
public E next()
NoSuchElementException
.next
in interface Iterator<E>
Iterator.next()
public void remove()
UnsupportedOperationException
.remove
in interface Iterator<E>
Iterator.remove()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.