Class MediaListImpl

  • All Implemented Interfaces:
    java.io.Serializable, MediaList

    public class MediaListImpl
    extends java.lang.Object
    implements MediaList, java.io.Serializable
    Version:
    $Release$
    Author:
    David Schweinsberg
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendMedium​(java.lang.String newMedium)
      Adds the medium newMedium to the end of the list.
      void deleteMedium​(java.lang.String oldMedium)
      Deletes the medium indicated by oldMedium from the list.
      int getLength()
      The number of media in the list.
      java.lang.String getMediaText()
      The parsable textual representation of the media list.
      java.lang.String item​(int index)
      Returns the indexth in the list.
      void setMediaText​(java.lang.String mediaText)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MediaListImpl

        public MediaListImpl​(SACMediaList mediaList)
    • Method Detail

      • getMediaText

        public java.lang.String getMediaText()
        Description copied from interface: MediaList
        The parsable textual representation of the media list. This is a comma-separated list of media.
        Specified by:
        getMediaText in interface MediaList
      • setMediaText

        public void setMediaText​(java.lang.String mediaText)
                          throws org.w3c.dom.DOMException
        Specified by:
        setMediaText in interface MediaList
        Throws:
        org.w3c.dom.DOMException
      • getLength

        public int getLength()
        Description copied from interface: MediaList
        The number of media in the list. The range of valid media is 0 to length-1 inclusive.
        Specified by:
        getLength in interface MediaList
      • item

        public java.lang.String item​(int index)
        Description copied from interface: MediaList
        Returns the indexth in the list. If index is greater than or equal to the number of media in the list, this returns null.
        Specified by:
        item in interface MediaList
        Parameters:
        index - Index into the collection.
        Returns:
        The medium at the indexth position in the MediaList, or null if that is not a valid index.
      • deleteMedium

        public void deleteMedium​(java.lang.String oldMedium)
                          throws org.w3c.dom.DOMException
        Description copied from interface: MediaList
        Deletes the medium indicated by oldMedium from the list.
        Specified by:
        deleteMedium in interface MediaList
        Throws:
        org.w3c.dom.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
        NOT_FOUND_ERR: Raised if oldMedium is not in the list.
      • appendMedium

        public void appendMedium​(java.lang.String newMedium)
                          throws org.w3c.dom.DOMException
        Description copied from interface: MediaList
        Adds the medium newMedium to the end of the list. If the newMedium is already used, it is first removed.
        Specified by:
        appendMedium in interface MediaList
        Throws:
        org.w3c.dom.DOMException - INVALID_CHARACTER_ERR: If the medium contains characters that are invalid in the underlying style language.
        NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object