Package org.apache.flink.runtime.util
Class ReusingMutableToRegularIteratorWrapper<T>
- java.lang.Object
-
- org.apache.flink.runtime.util.ReusingMutableToRegularIteratorWrapper<T>
-
public class ReusingMutableToRegularIteratorWrapper<T> extends Object implements Iterator<T>, Iterable<T>
This class wraps aMutableObjectIterator
into a regularIterator
. Internally, it uses two record instances which it uses alternating. That way, whenever hasNext() returns (possibly with false), the previous obtained record is still valid and cannot have been overwritten internally.
-
-
Constructor Summary
Constructors Constructor Description ReusingMutableToRegularIteratorWrapper(MutableObjectIterator<T> source, TypeSerializer<T> serializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Iterator<T>
iterator()
T
next()
void
remove()
-
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
-
-
-
-
Constructor Detail
-
ReusingMutableToRegularIteratorWrapper
public ReusingMutableToRegularIteratorWrapper(MutableObjectIterator<T> source, TypeSerializer<T> serializer)
-
-