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 TypeMethodDescriptionbooleanReturns the CSS text.Returns the CSS value type.doubleReturns the double value.intReturns the length of the list if the value is a list, otherwise returns 0.Returns the lexical unit type.Returns the primitive type.Returns the string value.getValue()Returns the value.inthashCode()item(int index) Returns the value at the specified index.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
Returns the value.- Returns:
- the value
-
getCssText
Returns the CSS text.- Returns:
- the css text
-
setCssText
Sets the css text.- Parameters:
cssText- the new css text- Throws:
DOMException- in case of error
-
getCssValueType
Returns the CSS value type.- Returns:
- the css value type
-
getPrimitiveType
Returns the primitive type.- Returns:
- the primitive type
-
getLexicalUnitType
Returns the lexical unit type.- 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
Returns the double value.- Returns:
- the double value
- Throws:
DOMException- in case of error
-
getStringValue
Returns the string value.- Returns:
- the string value
- Throws:
DOMException- in case of error
-
getLength
public int getLength()Returns the length of the list if the value is a list, otherwise returns 0.- Returns:
- the length
-
item
Returns the value at the specified index.- Parameters:
index- the position- Returns:
- the value at the position
-
toString
-
equals
-
hashCode
public int hashCode()
-