Interface KeyValueIterator<K,V>
-
public interface KeyValueIterator<K,V>An internal iterator interface which presents a more restrictive API thanIterator. This iterator can avoid using Tuple2 to wrap key and value.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanadvanceNext()Advance this iterator by a single kv.KgetKey()Retrieve the key from this iterator.VgetValue()Retrieve the value from this iterator.
-
-
-
Method Detail
-
advanceNext
boolean advanceNext() throws IOExceptionAdvance this iterator by a single kv. Returnsfalseif this iterator has no more kvs andtrueotherwise. If this returnstrue, then the new kv can be retrieved by callinggetKey()andgetValue().- Throws:
IOException
-
getKey
K getKey()
Retrieve the key from this iterator. This method is idempotent. It is illegal to call this method afteradvanceNext()has returnedfalse.
-
getValue
V getValue()
Retrieve the value from this iterator. This method is idempotent. It is illegal to call this method afteradvanceNext()has returnedfalse.
-
-