Package org.apache.flink.runtime.util
Class EmptyIterator<E>
- java.lang.Object
-
- org.apache.flink.runtime.util.EmptyIterator<E>
-
-
Constructor Summary
Constructors Constructor Description EmptyIterator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 aNoSuchElementException
.void
remove()
Throws aUnsupportedOperationException
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Method Detail
-
get
public static <E> EmptyIterator<E> 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.- Specified by:
hasNext
in interfaceIterator<E>
- See Also:
Iterator.hasNext()
-
next
public E next()
Always throws aNoSuchElementException
.- Specified by:
next
in interfaceIterator<E>
- See Also:
Iterator.next()
-
remove
public void remove()
Throws aUnsupportedOperationException
.- Specified by:
remove
in interfaceIterator<E>
- See Also:
Iterator.remove()
-
-