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 interfaceMetadata.EntryA 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 MetadatacopyWithAppendedEntries(Metadata.Entry... entriesToAppend)Returns a copy of this metadata with the specified entries appended.MetadatacopyWithAppendedEntriesFrom(Metadata other)Returns a copy of this metadata with the entries of the specified metadata appended.intdescribeContents()booleanequals(Object obj)Metadata.Entryget(int index)Returns the entry at the specified index.inthashCode()intlength()Returns the number of metadata entries.StringtoString()voidwriteToParcel(Parcel dest, int flags)
-
-
-
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 ifotheris 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.
-
describeContents
public int describeContents()
- Specified by:
describeContentsin interfaceParcelable
-
writeToParcel
public void writeToParcel(Parcel dest, int flags)
- Specified by:
writeToParcelin interfaceParcelable
-
-