public class ReusingMutableToRegularIteratorWrapper<T> extends Object implements Iterator<T>, Iterable<T>
MutableObjectIterator
into a regular Iterator
.
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 and Description |
---|
ReusingMutableToRegularIteratorWrapper(MutableObjectIterator<T> source,
TypeSerializer<T> serializer) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
Iterator<T> |
iterator() |
T |
next() |
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining
forEach, spliterator
public ReusingMutableToRegularIteratorWrapper(MutableObjectIterator<T> source, TypeSerializer<T> serializer)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.