Package org.apache.trevni

# Class MetaData<T extends MetaData>

java.lang.Object
java.util.AbstractMap<String,byte[]>
java.util.HashMap<String,byte[]>
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>`

## Nested classes/interfaces inherited from interface java.util.Map

`Map.Entry<K,V>`

## Constructor Summary

Constructors
Constructor
Description
`MetaData()`

## Method Summary

Modifier and Type
Method
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 Details

### MetaData

public MetaData()

## Method Details

### 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[]>`