Class PrimitiveValue
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 primitive type.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, 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 class:StyleValue- Overrides:
isPrimitiveValuein classStyleValue- Returns:
trueif the value isTYPEDorPROXY.
-
setExpectInteger
public void 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
-
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.
-
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- Specified by:
clonein classStyleValue- Returns:
- a copy of this object.
-