com.steadystate.css.dom

Class MediaListImpl

Implemented Interfaces:
MediaList, Serializable

public class MediaListImpl
extends java.lang.Object
implements MediaList, Serializable

Version:
$Release$
Author:
David Schweinsberg

Constructor Summary

MediaListImpl(SACMediaList mediaList)

Method Summary

void
appendMedium(String newMedium)
Adds the medium newMedium to the end of the list.
void
deleteMedium(String oldMedium)
Deletes the medium indicated by oldMedium from the list.
int
getLength()
The number of media in the list.
String
getMediaText()
The parsable textual representation of the media list.
String
item(int index)
Returns the indexth in the list.
void
setMediaText(String mediaText)
String
toString()

Constructor Details

MediaListImpl

public MediaListImpl(SACMediaList mediaList)

Method Details

appendMedium

public void appendMedium(String newMedium)
            throws DOMException
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
Parameters:

deleteMedium

public void deleteMedium(String oldMedium)
            throws DOMException
Deletes the medium indicated by oldMedium from the list.
Specified by:
deleteMedium in interface MediaList
Parameters:

getLength

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

getMediaText

public String getMediaText()
The parsable textual representation of the media list. This is a comma-separated list of media.
Specified by:
getMediaText in interface MediaList

item

public String item(int index)
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.

setMediaText

public void setMediaText(String mediaText)
            throws DOMException
Specified by:
setMediaText in interface MediaList

toString

public String toString()