Package org.apache.flink.runtime.util
Class EmptyIterator<E>
java.lang.Object
org.apache.flink.runtime.util.EmptyIterator<E>
An empty iterator that never returns anything.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <E> EmptyIterator<E>get()Gets a singleton instance of the empty iterator.booleanhasNext()Always returns false, since this iterator is empty.iterator()next()Always throws aNoSuchElementException.voidremove()Throws aUnsupportedOperationException.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
EmptyIterator
public EmptyIterator()
-
-
Method Details
-
get
Gets a singleton instance of the empty iterator.- Type Parameters:
E- The type of the objects (not) returned by the iterator.- Returns:
- An instance of the iterator.
-
hasNext
public boolean hasNext()Always returns false, since this iterator is empty. -
next
Always throws aNoSuchElementException. -
remove
public void remove()Throws aUnsupportedOperationException. -
iterator
-