Package org.htmlunit.cssparser.dom
Class CSSValueImpl
java.lang.Object
org.htmlunit.cssparser.parser.AbstractLocatable
org.htmlunit.cssparser.dom.CSSValueImpl
- All Implemented Interfaces:
Serializable
,Locatable
The
CSSValueImpl
class can represent either a
CSSPrimitiveValue
or a CSSValueList
so that
the type can successfully change when using setCssText
.- Author:
- Ronald Brill
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
CSSPrimitiveValueType enum.static enum
CSSValueType enum. -
Constructor Summary
ConstructorDescriptionCSSValueImpl
(LexicalUnit value) Ctor.CSSValueImpl
(LexicalUnit value, boolean forcePrimitive) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getCssText.getCssValueType.double
getDoubleValue.int
getLexicalUnitType.getPrimitiveType.getStringValue.getValue()
getValue.int
hashCode()
item
(int index) item.void
setCssText
(String cssText) Sets the css text.void
setDoubleValue
(double doubleValue) Sets the double value to a new value.toString()
Methods inherited from class org.htmlunit.cssparser.parser.AbstractLocatable
getLocator, setLocator
-
Constructor Details
-
CSSValueImpl
Constructor.- Parameters:
value
- the lexical unit valueforcePrimitive
- true or false
-
CSSValueImpl
Ctor.- Parameters:
value
- the value
-
-
Method Details
-
getValue
getValue.
- Returns:
- the value
-
getCssText
getCssText.
- Returns:
- the css text
-
setCssText
Sets the css text.- Parameters:
cssText
- the new css text- Throws:
DOMException
- in case of error
-
getCssValueType
getCssValueType.
- Returns:
- the css value type
-
getPrimitiveType
getPrimitiveType.
- Returns:
- the primitive type
-
getLexicalUnitType
getLexicalUnitType.
- Returns:
- the lexical unit type
-
setDoubleValue
Sets the double value to a new value.- Parameters:
doubleValue
- the new value- Throws:
DOMException
- in case of error
-
getDoubleValue
getDoubleValue.
- Returns:
- the double value.
- Throws:
DOMException
- in case of error
-
getStringValue
getStringValue.
- Returns:
- the string value.
- Throws:
DOMException
- case of error
-
getLength
public int getLength()- Returns:
- the length
- Throws:
DOMException
- in case of error
-
item
item.
- Parameters:
index
- the position- Returns:
- the value at the position
-
toString
-
equals
-
hashCode
public int hashCode()
-