public final class KeyGroupedMutableObjectIterator<E> extends Object
| Constructor and Description |
|---|
KeyGroupedMutableObjectIterator(MutableObjectIterator<E> iterator,
TypeSerializer<E> serializer,
TypeComparator<E> comparator)
Initializes the KeyGroupedIterator.
|
| Modifier and Type | Method and Description |
|---|---|
MutableObjectIterator<E> |
getValues()
Returns an iterator over all values that belong to the current key.
|
boolean |
nextKey()
Moves the iterator to the next key.
|
public KeyGroupedMutableObjectIterator(MutableObjectIterator<E> iterator, TypeSerializer<E> serializer, TypeComparator<E> comparator)
iterator - An iterator over records, which are sorted by the key fields, in any order.serializer - The serializer for the data type iterated over.comparator - The comparator for the data type iterated over.public boolean nextKey()
throws IOException
getValues() method. Hence, if called multiple times it "removes" pairs.IOExceptionpublic MutableObjectIterator<E> getValues()
null
(before the first call to nextKey() and after all keys are consumed. In general, this method returns
always a non-null value, if a previous call to nextKey() return true.Copyright © 2015 The Apache Software Foundation. All rights reserved.