Class Metadata

  • All Implemented Interfaces:
    Parcelable

    public final class Metadata
    extends Object
    implements Parcelable
    A collection of metadata entries.
    • 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