Package org.apache.flink.runtime.util
Class SingleElementIterator<E>
java.lang.Object
org.apache.flink.runtime.util.SingleElementIterator<E>
- Type Parameters:
E- The generic type of the iterator.
An
Iterator that contains only a single element. The element can be reset such that the
iterator can be used multiple times. Initially, the iterator is empty until an element is set via
set(Object).-
Constructor Summary
Constructors -
Method Summary
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
-
SingleElementIterator
public SingleElementIterator()
-
-
Method Details
-
set
Resets the element. After this call, the iterator has one element available, which is the given element.- Parameters:
current- The element to make available to the iterator.
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
iterator
-