Class CSSValueImpl

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

    public class CSSValueImpl
    extends AbstractLocatable
    implements java.io.Serializable
    The CSSValueImpl class can represent either a CSSPrimitiveValue or a CSSValueList so that the type can successfully change when using setCssText.
    See Also:
    Serialized Form
    • Field Detail

      • value_

        private java.lang.Object value_
    • Constructor Detail

      • CSSValueImpl

        public CSSValueImpl​(LexicalUnit value,
                            boolean forcePrimitive)
        Constructor.
        Parameters:
        value - the lexical unit value
        forcePrimitive - true or false
      • CSSValueImpl

        public CSSValueImpl​(LexicalUnit value)
        Ctor.
        Parameters:
        value - the value
    • Method Detail

      • getValue

        public java.lang.Object getValue()
        Returns:
        the value
      • getCssText

        public java.lang.String getCssText()
        Returns:
        the css text
      • setCssText

        public void setCssText​(java.lang.String cssText)
                        throws org.w3c.dom.DOMException
        Sets the css text.
        Parameters:
        cssText - the new css text
        Throws:
        org.w3c.dom.DOMException - in case of error
      • setDoubleValue

        public void setDoubleValue​(double doubleValue)
                            throws org.w3c.dom.DOMException
        Sets the double value to a new value.
        Parameters:
        doubleValue - the new value
        Throws:
        org.w3c.dom.DOMException - in case of error
      • getDoubleValue

        public double getDoubleValue()
                              throws org.w3c.dom.DOMException
        Returns:
        the double value.
        Throws:
        org.w3c.dom.DOMException - in case of error
      • getStringValue

        public java.lang.String getStringValue()
                                        throws org.w3c.dom.DOMException
        Returns:
        the string value.
        Throws:
        org.w3c.dom.DOMException - case of error
      • getLength

        public int getLength()
        Returns:
        the length
        Throws:
        org.w3c.dom.DOMException - in case of error
      • item

        public CSSValueImpl item​(int index)
        Parameters:
        index - the position
        Returns:
        the value at the position
        Throws:
        org.w3c.dom.DOMException - in case of error
      • toString

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

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object