Class StringValue

  • All Implemented Interfaces:
    Value
    Direct Known Subclasses:
    URIValue

    public class StringValue
    extends AbstractValue
    This class represents string values.
    • Field Detail

      • value

        protected java.lang.String value
        The value of the string
      • unitType

        protected short unitType
        The unit type
    • Constructor Detail

      • StringValue

        public StringValue​(short type,
                           java.lang.String s)
        Creates a new StringValue.
    • Method Detail

      • getCssText

        public static java.lang.String getCssText​(short type,
                                                  java.lang.String value)
        Returns the CSS text associated with the given type/value pair.
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - the reference object with which to compare.
      • getCssText

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

        public java.lang.String getStringValue()
                                        throws org.w3c.dom.DOMException
        This method is used to get the string value.
        Specified by:
        getStringValue in interface Value
        Overrides:
        getStringValue in class AbstractValue
        Throws:
        org.w3c.dom.DOMException - INVALID_ACCESS_ERR: Raised if the value doesn't contain a string value.
      • toString

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