java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
io.sf.carte.doc.style.css.property.PrimitiveValue
- All Implemented Interfaces:
CSSPrimitiveValue,CSSValue,Serializable,Cloneable
- Direct Known Subclasses:
ProxyValue,TypedValue
Base implementation for primitive values.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrimitiveValue(CSSValue.Type unitType) protectedPrimitiveValue(PrimitiveValue copied) -
Method Summary
Modifier and TypeMethodDescriptionabstract PrimitiveValueclone()Creates and returns a copy of this object.booleanGet the list of preceding comments.Get the primitive type.Get the list of trailing comments.inthashCode()booleanbooleanIs this a subproperty that has been set by a shorthand?voidThis value is expected to contain an integer.voidsetSubproperty(boolean subp) Methods inherited from class io.sf.carte.doc.style.css.property.StyleValue
getCssText, getMinifiedCssText, isSystemDefault, matches, setCssText, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.CSSPrimitiveValue
getUnitType, isNegativeNumberMethods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssText, getCssValueType, getMinifiedCssText, getMinifiedCssText, matches, setCssText, writeCssText
-
Constructor Details
-
PrimitiveValue
-
PrimitiveValue
-
-
Method Details
-
getPrimitiveType
Description copied from interface:CSSValueGet the primitive type.- Specified by:
getPrimitiveTypein interfaceCSSValue- Returns:
- the primitive type.
-
isPrimitiveValue
public boolean isPrimitiveValue()Description copied from interface:CSSPrimitiveValue- Specified by:
isPrimitiveValuein interfaceCSSPrimitiveValue- Specified by:
isPrimitiveValuein interfaceCSSValue- Returns:
trueif the value isTYPEDorPROXY.
-
setExpectInteger
Description copied from interface:CSSPrimitiveValueThis value is expected to contain an integer.If this value is a non-integer number, an exception will be thrown immediately.
If this value is a
calc()that ever produces a non-integer number, the value shall be rounded to the nearest integer.If the value is a proxy that ever produces other than an integer number (without
calc()involvement), an exception should be thrown later.- Specified by:
setExpectIntegerin interfaceCSSPrimitiveValue- Throws:
DOMException- TYPE_MISMATCH_ERR if the value is a constant number and not an integer.
-
setSubproperty
public void setSubproperty(boolean subp) -
isSubproperty
public boolean isSubproperty()Description copied from class:StyleValueIs this a subproperty that has been set by a shorthand?- Overrides:
isSubpropertyin classStyleValue- Returns:
trueif this a subproperty that has been set by a shorthand,falseotherwise.
-
getPrecedingComments
Description copied from interface:CSSValueGet the list of preceding comments.- Specified by:
getPrecedingCommentsin interfaceCSSValue- Returns:
- the list of preceding comments, or
nullif none.
-
getTrailingComments
Description copied from interface:CSSValueGet the list of trailing comments.- Specified by:
getTrailingCommentsin interfaceCSSValue- Returns:
- the list of trailing comments, or
nullif none.
-
hashCode
public int hashCode()- Overrides:
hashCodein classStyleValue
-
equals
- Overrides:
equalsin classStyleValue
-
clone
Creates and returns a copy of this object.The object will be the same except for the
subpropertyflag, that will be disabled in the clone object.- Specified by:
clonein interfaceCSSValue- Overrides:
clonein classStyleValue- Returns:
- a copy of this object.
-