Package org.apache.avro.hadoop.io

# Class AvroKeyValue.Iterator<K,V>

java.lang.Object
org.apache.avro.hadoop.io.AvroKeyValue.Iterator<K,V>

Type Parameters:
  `K` - The key type.
  `V` - The value type.

All Implemented Interfaces:
  `Iterator<AvroKeyValue<K,V>>`

Enclosing class:
  `AvroKeyValue<K,V>`

public static class AvroKeyValue.Iterator<K,V> extends Object implements Iterator<AvroKeyValue<K,V>>
A wrapper for iterators over GenericRecords that are known to be KeyValue records.

## Constructor Summary

Constructors
Constructor
Description
`Iterator(Iterator<? extends org.apache.avro.generic.GenericRecord> genericIterator)`
Constructs an iterator over key-value map entries out of a generic iterator.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`hasNext()`
`AvroKeyValue<K,V>`
`next()`
`void`
`remove()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

## Constructor Details

### Iterator

public Iterator(Iterator<? extends org.apache.avro.generic.GenericRecord> genericIterator)
Constructs an iterator over key-value map entries out of a generic iterator.

Parameters:
  `genericIterator` - An iterator over some generic record entries.

## Method Details

### hasNext

public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<K>`

### next

public AvroKeyValue<K,V> next()

Specified by:
  `next` in interface `Iterator<K>`

### remove

public void remove()

Specified by:
  `remove` in interface `Iterator<K>`