org.apache.avro.generic

## Interface IndexedRecord

- All Superinterfaces:
    GenericContainer
  All Known Subinterfaces:
    GenericRecord, SpecificRecord
  All Known Implementing Classes:
    GenericData.Record, HandshakeRequest, HandshakeResponse, Pair, SpecificExceptionBase, SpecificRecordBase

      public interface IndexedRecord
      extends GenericContainer

  A record implementation that permits field access by integer index.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get(int i)` Return the value of a field given its position in the schema.
    `void` | `put(int i, Object v)` Set the value of a field given its position in the schema.

    - ### Methods inherited from interface org.apache.avro.generic.GenericContainer

      `getSchema`

- - ### Method Detail

    - #### put

          void put(int i,
                   Object v)

      Set the value of a field given its position in the schema.

      This method is not meant to be called by user code, but only by `DatumReader` implementations.

    - #### get

          Object get(int i)

      Return the value of a field given its position in the schema.

      This method is not meant to be called by user code, but only by `DatumWriter` implementations.

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