org.apache.trevni

## Class MetaData<T extends MetaData>

- java.lang.Object
- - java.util.AbstractMap<K,V>
  - - java.util.HashMap<K,V>
    - - java.util.LinkedHashMap<String,byte[]>
      - - org.apache.trevni.MetaData<T>

- All Implemented Interfaces:
    Serializable, Cloneable, Map<String,byte[]>
  Direct Known Subclasses:
    ColumnFileMetaData, ColumnMetaData

      public class MetaData<T extends MetaData>
      extends LinkedHashMap<String,byte[]>

  Base class for metadata.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.util.AbstractMap

      `AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MetaData()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getBoolean(String key)` Return true iff a key has any value, false if it is not present.
    `String` | `getChecksum()` Return the checksum algorithm name.
    `String` | `getCodec()` Return the compression codec name.
    `long` | `getLong(String key)` Return the value of a metadata property as a long.
    `String` | `getString(String key)` Return the value of a metadata property as a String.
    `static boolean` | `isReserved(String key)` Test if a metadata key is reserved.
    `T` | `set(String key, byte[] value)` Set a metadata property to a binary value.
    `T` | `set(String key, long value)` Set a metadata property to a long value.
    `T` | `set(String key, String value)` Set a metadata property to a String value.
    `T` | `setChecksum(String checksum)` Set the checksum algorithm name.
    `T` | `setCodec(String codec)` Set the compression codec name.
    `String` | `toString()`

    - ### Methods inherited from class java.util.LinkedHashMap

      `clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, values`

    - ### Methods inherited from class java.util.HashMap

      `clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

    - ### Methods inherited from class java.util.AbstractMap

      `equals, hashCode`

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

      `finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.util.Map

      `compute, computeIfAbsent, computeIfPresent, containsKey, equals, hashCode, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, size`

- - ### Constructor Detail

    - #### MetaData

          public MetaData()

  - ### Method Detail

    - #### getCodec

          public String getCodec()

      Return the compression codec name.

    - #### setCodec

          public T setCodec(String codec)

      Set the compression codec name.

    - #### getChecksum

          public String getChecksum()

      Return the checksum algorithm name.

    - #### setChecksum

          public T setChecksum(String checksum)

      Set the checksum algorithm name.

    - #### getString

          public String getString(String key)

      Return the value of a metadata property as a String.

    - #### getLong

          public long getLong(String key)

      Return the value of a metadata property as a long.

    - #### getBoolean

          public boolean getBoolean(String key)

      Return true iff a key has any value, false if it is not present.

    - #### set

          public T set(String key,
                       byte[] value)

      Set a metadata property to a binary value.

    - #### isReserved

          public static boolean isReserved(String key)

      Test if a metadata key is reserved.

    - #### set

          public T set(String key,
                       String value)

      Set a metadata property to a String value.

    - #### set

          public T set(String key,
                       long value)

      Set a metadata property to a long value.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `AbstractMap<String,byte[]>`

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