org.apache.avro.generic

## Interface GenericRecord

- All Superinterfaces:
    GenericContainer, IndexedRecord
  All Known Implementing Classes:
    GenericData.Record, HandshakeRequest, HandshakeResponse, SpecificRecordBase

      public interface GenericRecord
      extends IndexedRecord

  A generic instance of a record schema. Fields are accessible by name as well as by index.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `Object` | `get(String key)` Return the value of a field given its name.
    `default boolean` | `hasField(String key)` Return true if record has field with name: key
    `void` | `put(String key, Object v)` Set the value of a field given its name.

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

      `get, put`

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

      `getSchema`

- - ### Method Detail

    - #### put

          void put(String key,
                   Object v)

      Set the value of a field given its name.

    - #### get

          Object get(String key)

      Return the value of a field given its name.

    - #### hasField

          default boolean hasField(String key)

      Return true if record has field with name: key

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