org.apache.batik.css.value
Class ImmutableString
java.lang.Object
|
+--org.apache.batik.css.value.AbstractImmutableValue
|
+--org.apache.batik.css.value.AbstractImmutablePrimitiveValue
|
+--org.apache.batik.css.value.ImmutableString
- All Implemented Interfaces:
- ImmutableValue
- public class ImmutableString
- extends AbstractImmutablePrimitiveValue
This class represents immutable string values
Field Summary |
protected short |
unitType
The unit type |
protected java.lang.String |
value
The value of the string |
Constructor Summary |
ImmutableString(short type,
java.lang.String value)
Creates a new value. |
Method Summary |
ImmutableValue |
createReadOnlyCopy()
Returns a deep read-only copy of this object. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
java.lang.String |
getCssText()
A string representation of the current value. |
short |
getPrimitiveType()
The type of the value as defined by the constants specified in
CSSPrimitiveValue. |
java.lang.String |
getStringValue()
This method is used to get the string value. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
protected java.lang.String value
- The value of the string
unitType
protected short unitType
- The unit type
ImmutableString
public ImmutableString(short type,
java.lang.String value)
- Creates a new value.
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.
createReadOnlyCopy
public ImmutableValue createReadOnlyCopy()
- Returns a deep read-only copy of this object.
getCssText
public java.lang.String getCssText()
- A string representation of the current value.
getPrimitiveType
public short getPrimitiveType()
- The type of the value as defined by the constants specified in
CSSPrimitiveValue.
- Overrides:
getPrimitiveType
in class AbstractImmutablePrimitiveValue
getStringValue
public java.lang.String getStringValue()
throws DOMException
- This method is used to get the string value.
- Overrides:
getStringValue
in class AbstractImmutableValue
- Throws:
DOMException
- INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string
value.
Copyright © 2001 Apache Software Foundation. All Rights Reserved.