Class MediaListImpl

java.lang.Object
org.htmlunit.cssparser.parser.AbstractLocatable
org.htmlunit.cssparser.dom.MediaListImpl
All Implemented Interfaces:
Serializable, Locatable

public class MediaListImpl extends AbstractLocatable implements Serializable
Implementation of MediaList.
Author:
Ronald Brill
See Also:
  • Constructor Details

    • MediaListImpl

      public MediaListImpl(MediaQueryList mediaList)
      Creates new MediaList.
      Parameters:
      mediaList - the media list
  • Method Details

    • getMediaText

      public String getMediaText()

      getMediaText.

      Returns:
      the media text
    • setMediaText

      public void setMediaText(String mediaText) throws DOMException
      Parses the given media text.
      Parameters:
      mediaText - text to be parsed
      Throws:
      DOMException - in case of error
    • getLength

      public int getLength()

      getLength.

      Returns:
      the media query count
    • mediaQuery

      public MediaQuery mediaQuery(int index)

      mediaQuery.

      Parameters:
      index - the position of the media query
      Returns:
      the media query at the given pos
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setMedia

      public void setMedia(List<String> media)
      Resets the list of media queries.
      Parameters:
      media - the media queries string to be parsed
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object