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.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCSSPrimitiveValueType enum.static enumCSSValueType enum. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCSSValueImpl(LexicalUnit value) Ctor.CSSValueImpl(LexicalUnit value, boolean forcePrimitive) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleandoubleintgetValue()private static List<CSSValueImpl> getValues(LexicalUnit value) inthashCode()item(int index) voidsetCssText(String cssText) Sets the css text.voidsetDoubleValue(double doubleValue) Sets the double value to a new value.toString()Methods inherited from class AbstractLocatable
getLocator, setLocator
-
Field Details
-
value_
-
-
Constructor Details
-
CSSValueImpl
Constructor.- Parameters:
value- the lexical unit valueforcePrimitive- true or false
-
CSSValueImpl
-
-
Method Details
-
getValue
- Returns:
- the value
-
getValues
-
getCssText
- 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
-
getPrimitiveType
- Returns:
- the primitive type
-
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
- Returns:
- the double value.
- Throws:
DOMException- in case of error
-
getStringValue
- Returns:
- the string value.
- Throws:
DOMException- case of error
-
getLength
public int getLength()- Returns:
- the length
- Throws:
DOMException- in case of error
-
item
- Parameters:
index- the position- Returns:
- the value at the position
- Throws:
DOMException- in case of error
-
toString
-
equals
-
hashCode
-