Class MediaGroup

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class MediaGroup
    extends Object
    implements Cloneable, Serializable
    <media:group>

    <media:group> is a sub-element of <item>. It allows grouping of <media:content> elements that are effectively the same content, yet different representations. For instance: the same song recorded in both the WAV and MP3 format. It's an optional element that must only be used for this purpose.

    See Also:
    Serialized Form
    • Constructor Detail

      • MediaGroup

        public MediaGroup​(MediaContent[] contents)
        Parameters:
        contents - Contents of the group.
      • MediaGroup

        public MediaGroup​(MediaContent[] contents,
                          Integer defaultContentIndex)
        Parameters:
        contents - contents of the group
        defaultContentIndex - index of the default content value.
      • MediaGroup

        public MediaGroup​(MediaContent[] contents,
                          Integer defaultContentIndex,
                          Metadata metadata)
        Parameters:
        contents - contents of the group
        defaultContentIndex - index of the default content item.
        metadata - metadata for the group.
    • Method Detail

      • setContents

        public void setContents​(MediaContent[] contents)
        MediaContents for the group
        Parameters:
        contents - MediaContents for the group
      • getContents

        public MediaContent[] getContents()
        MediaContents for the group
        Returns:
        MediaContents for the group
      • setDefaultContentIndex

        public void setDefaultContentIndex​(Integer defaultContentIndex)
        Default content index MediaContent.
        Parameters:
        defaultContentIndex - Default content index MediaContent.
      • getDefaultContentIndex

        public Integer getDefaultContentIndex()
        Default content index MediaContent.
        Returns:
        Default content index MediaContent.
      • setMetadata

        public void setMetadata​(Metadata metadata)
        Metadata for the group
        Parameters:
        metadata - Metadata for the group
      • getMetadata

        public Metadata getMetadata()
        Metadata for the group
        Returns:
        Metadata for the group
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object