Package com.google.android.exoplayer2.metadata

## Class Metadata

- java.lang.Object
- - com.google.android.exoplayer2.metadata.Metadata

- All Implemented Interfaces:
    `Parcelable`

      public final class Metadata
      extends Object
      implements Parcelable

  A collection of metadata entries.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static interface` | `Metadata.Entry` | A metadata entry.

    - ### Nested classes/interfaces inherited from interface android.os.Parcelable

      `Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>`

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Parcelable.Creator<Metadata>` | `CREATOR` |

    - ### Fields inherited from interface android.os.Parcelable

      `CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Metadata​(Metadata.Entry... entries)` |
    `Metadata​(List<? extends Metadata.Entry> entries)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Metadata` | `copyWithAppendedEntries​(Metadata.Entry... entriesToAppend)` | Returns a copy of this metadata with the specified entries appended.
    `Metadata` | `copyWithAppendedEntriesFrom​(Metadata other)` | Returns a copy of this metadata with the entries of the specified metadata appended.
    `int` | `describeContents()` |
    `boolean` | `equals​(Object obj)` |
    `Metadata.Entry` | `get​(int index)` | Returns the entry at the specified index.
    `int` | `hashCode()` |
    `int` | `length()` | Returns the number of metadata entries.
    `String` | `toString()` |
    `void` | `writeToParcel​(Parcel dest, int flags)` |

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

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

- - ### Field Detail

    - #### CREATOR

          public static final Parcelable.Creator<Metadata> CREATOR

  - ### Constructor Detail

    - #### Metadata

          public Metadata​(Metadata.Entry... entries)

      Parameters:
        `entries` - The metadata entries.

    - #### Metadata

          public Metadata​(List<? extends Metadata.Entry> entries)

      Parameters:
        `entries` - The metadata entries.

  - ### Method Detail

    - #### length

          public int length()

      Returns the number of metadata entries.

    - #### get

          public Metadata.Entry get​(int index)

      Returns the entry at the specified index.
      Parameters:
        `index` - The index of the entry.
      Returns:
        The entry at the specified index.

    - #### copyWithAppendedEntriesFrom

          public Metadata copyWithAppendedEntriesFrom​(@Nullable
                                                      Metadata other)

      Returns a copy of this metadata with the entries of the specified metadata appended. Returns this instance if `other` is null.
      Parameters:
        `other` - The metadata that holds the entries to append. If null, this methods returns this instance.
      Returns:
        The metadata instance with the appended entries.

    - #### copyWithAppendedEntries

          public Metadata copyWithAppendedEntries​(Metadata.Entry... entriesToAppend)

      Returns a copy of this metadata with the specified entries appended.
      Parameters:
        `entriesToAppend` - The entries to append.
      Returns:
        The metadata instance with the appended entries.

    - #### equals

          public boolean equals​(@Nullable
                                Object obj)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### describeContents

          public int describeContents()

      Specified by:
        `describeContents` in interface `Parcelable`

    - #### writeToParcel

          public void writeToParcel​(Parcel dest,
                                    int flags)

      Specified by:
        `writeToParcel` in interface `Parcelable`