public final class NonReusingKeyGroupedIterator<E> extends Object implements KeyGroupedIterator<E>
| Modifier and Type | Class and Description |
|---|---|
class |
NonReusingKeyGroupedIterator.ValuesIterator |
| Constructor and Description |
|---|
NonReusingKeyGroupedIterator(org.apache.flink.util.MutableObjectIterator<E> iterator,
org.apache.flink.api.common.typeutils.TypeComparator<E> comparator)
Initializes the KeyGroupedIterator.
|
| Modifier and Type | Method and Description |
|---|---|
org.apache.flink.api.common.typeutils.TypeComparator<E> |
getComparatorWithCurrentReference() |
E |
getCurrent() |
NonReusingKeyGroupedIterator.ValuesIterator |
getValues()
Returns an iterator over all values that belong to the current key.
|
boolean |
nextKey()
Moves the iterator to the next key.
|
public NonReusingKeyGroupedIterator(org.apache.flink.util.MutableObjectIterator<E> iterator, org.apache.flink.api.common.typeutils.TypeComparator<E> comparator)
iterator - An iterator over records, which are sorted by the key fields, in any order.comparator - The comparator for the data type iterated over.public boolean nextKey()
throws IOException
getValues() method. Hence, if called
multiple times it "removes" key groups.nextKey in interface KeyGroupedIterator<E>IOExceptionpublic E getCurrent()
getCurrent in interface KeyGroupedIterator<E>public org.apache.flink.api.common.typeutils.TypeComparator<E> getComparatorWithCurrentReference()
public NonReusingKeyGroupedIterator.ValuesIterator 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.getValues in interface KeyGroupedIterator<E>Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.