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
Nested ClassesModifier and TypeClassDescriptionstatic enumCSSPrimitiveValueType enum.static enumCSSValueType enum. -
Constructor Summary
ConstructorsConstructorDescriptionCSSValueImpl(LexicalUnit value) Ctor.CSSValueImpl(LexicalUnit value, boolean forcePrimitive) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleangetCssText.getCssValueType.doublegetDoubleValue.intgetLexicalUnitType.getPrimitiveType.getStringValue.getValue()getValue.inthashCode()item(int index) item.voidsetCssText(String cssText) Sets the css text.voidsetDoubleValue(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()
-