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 and Description
    `Iterator(Iterator<? extends GenericRecord> genericIterator)` Constructs an iterator over key-value map entries out of a generic iterator.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### Iterator

          public Iterator(Iterator<? extends 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 Detail

    - #### hasNext

          public boolean hasNext()

      Specified by:
        `hasNext` in interface `Iterator<AvroKeyValue<K,V>>`

    - #### next

          public AvroKeyValue<K,V> next()

      Specified by:
        `next` in interface `Iterator<AvroKeyValue<K,V>>`

    - #### remove

          public void remove()

      Specified by:
        `remove` in interface `Iterator<AvroKeyValue<K,V>>`

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.