Class ListValue

  • All Implemented Interfaces:
    Value

    public class ListValue
    extends AbstractValue
    This class represents a list of values.
    Version:
    $Id: ListValue.java 1733416 2016-03-03 07:07:13Z gadams $
    • Field Detail

      • length

        protected int length
        The length of the list.
      • items

        protected Value[] items
        The items.
      • separator

        protected char separator
        The list separator.
    • Constructor Detail

      • ListValue

        public ListValue()
        Creates a ListValue.
      • ListValue

        public ListValue​(char s)
        Creates a ListValue with the given separator.
    • Method Detail

      • getSeparatorChar

        public char getSeparatorChar()
        Returns the separator used for this list.
      • getCssText

        public java.lang.String getCssText()
        A string representation of the current value.
      • getLength

        public int getLength()
                      throws org.w3c.dom.DOMException
        Implements Value.getLength().
        Specified by:
        getLength in interface Value
        Overrides:
        getLength in class AbstractValue
        Throws:
        org.w3c.dom.DOMException - INVALID_ACCESS_ERR: Raised if the value doesn't contain a list value.
      • item

        public Value item​(int index)
                   throws org.w3c.dom.DOMException
        Implements Value.item(int).
        Specified by:
        item in interface Value
        Overrides:
        item in class AbstractValue
        Returns:
        The style rule at the index position in the list, or null if that is not a valid index.
        Throws:
        org.w3c.dom.DOMException - INVALID_ACCESS_ERR: Raised if the value doesn't contain a list value.
      • toString

        public java.lang.String toString()
        Returns a printable representation of this value.
        Overrides:
        toString in class java.lang.Object
      • append

        public void append​(Value v)
        Appends an item to the list.