Class StringValue

java.lang.Object
org.apache.batik.css.engine.value.AbstractValue
org.apache.batik.css.engine.value.StringValue
All Implemented Interfaces:
Value
Direct Known Subclasses:
URIValue

public class StringValue extends AbstractValue
This class represents string values.
Version:
$Id: StringValue.java 1733416 2016-03-03 07:07:13Z gadams $
  • Field Details

    • value

      protected String value
      The value of the string
    • unitType

      protected short unitType
      The unit type
  • Constructor Details

    • StringValue

      public StringValue(short type, String s)
      Creates a new StringValue.
  • Method Details

    • getCssText

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

      public short getPrimitiveType()
      The type of the value.
      Specified by:
      getPrimitiveType in interface Value
      Overrides:
      getPrimitiveType in class AbstractValue
    • equals

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

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

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

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