public interface KeyValueIterator<K,V>
Iterator
. This
iterator can avoid using Tuple2 to wrap key and value.Modifier and Type | Method and Description |
---|---|
boolean |
advanceNext()
Advance this iterator by a single kv.
|
K |
getKey()
Retrieve the key from this iterator.
|
V |
getValue()
Retrieve the value from this iterator.
|
boolean advanceNext() throws IOException
false
if this iterator has no more kvs
and true
otherwise. If this returns true
, then the new kv can be retrieved by
calling getKey()
and getValue()
.IOException
K getKey()
advanceNext()
has returned false
.V getValue()
advanceNext()
has returned false
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.