public class MergeIterator<E> extends Object implements MutableObjectIterator<E>
TypeComparator
class, specifically TypeComparator.setReference(Object)
and TypeComparator.compareToReference(TypeComparator)
.Constructor and Description |
---|
MergeIterator(List<MutableObjectIterator<E>> iterators,
TypeComparator<E> comparator) |
Modifier and Type | Method and Description |
---|---|
E |
next()
Gets the next smallest element, with respect to the definition of order implied by the
TypeSerializer provided to this iterator. |
E |
next(E reuse)
Gets the next smallest element, with respect to the definition of order implied by the
TypeSerializer provided to this iterator. |
public MergeIterator(List<MutableObjectIterator<E>> iterators, TypeComparator<E> comparator) throws IOException
iterators
- comparator
- IOException
public E next(E reuse) throws IOException
TypeSerializer
provided to this iterator.next
in interface MutableObjectIterator<E>
reuse
- Object that may be reused.IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the
serialization / deserialization logicMutableObjectIterator.next(java.lang.Object)
public E next() throws IOException
TypeSerializer
provided to this iterator.next
in interface MutableObjectIterator<E>
IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the
serialization / deserialization logicMutableObjectIterator.next()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.