java.lang.Object
io.sf.carte.doc.style.css.property.StyleValue
io.sf.carte.doc.style.css.property.PrimitiveValue
io.sf.carte.doc.style.css.property.TypedValue
io.sf.carte.doc.style.css.property.FunctionValue
io.sf.carte.doc.style.css.property.MathFunctionValue
- All Implemented Interfaces:
CSSFunctionValue
,CSSMathFunctionValue
,CSSMathValue
,CSSPrimitiveValue
,CSSTypedValue
,CSSValue
,Serializable
,Cloneable
Implementation of a mathematical function value.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSMathFunctionValue
CSSMathFunctionValue.MathFunction
Nested classes/interfaces inherited from interface io.sf.carte.doc.style.css.CSSValue
CSSValue.CssType, CSSValue.Type
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates and returns a copy of this object.short
Perform a dimensional analysis of this expression and compute the unit type of the result.boolean
Get the function type.int
hashCode()
boolean
Whether this value expects an integer result that must be rounded.matches
(CSSValueSyntax syntax) Verify if this value matches the given grammar.void
This value is expected to contain an integer.Methods inherited from class io.sf.carte.doc.style.css.property.FunctionValue
getArguments, getComponent, getComponentCount, getCssText, getFunctionName, getMinifiedCssText, getStringValue, setComponent, writeCssText
Methods inherited from class io.sf.carte.doc.style.css.property.TypedValue
getCssValueType, getFloatValue, isCalculatedNumber, isNumberZero, setFloatValue, setStringValue, toRGBColor
Methods inherited from class io.sf.carte.doc.style.css.property.PrimitiveValue
getPrimitiveType, isPrimitiveValue, isSubproperty, setSubproperty
Methods inherited from class io.sf.carte.doc.style.css.property.StyleValue
isSystemDefault, setCssText, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.sf.carte.doc.style.css.CSSFunctionValue
getArguments, getFunctionName
Methods inherited from interface io.sf.carte.doc.style.css.CSSPrimitiveValue
getUnitType, isNegativeNumber, isPrimitiveValue
Methods inherited from interface io.sf.carte.doc.style.css.CSSTypedValue
getFloatValue, getStringValue, isCalculatedNumber, isNumberZero, setFloatValue, setStringValue, toRGBColor, toRGBColorValue
Methods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssText, getCssValueType, getMinifiedCssText, getMinifiedCssText, getPrimitiveType, setCssText, writeCssText
-
Method Details
-
getFunction
Description copied from interface:CSSMathFunctionValue
Get the function type.- Specified by:
getFunction
in interfaceCSSMathFunctionValue
- Returns:
- the function type.
-
setExpectInteger
public void setExpectInteger()Description copied from interface:CSSPrimitiveValue
This 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:
setExpectInteger
in interfaceCSSPrimitiveValue
- Overrides:
setExpectInteger
in classPrimitiveValue
-
isExpectingInteger
public boolean isExpectingInteger()Description copied from interface:CSSMathValue
Whether this value expects an integer result that must be rounded.- Specified by:
isExpectingInteger
in interfaceCSSMathValue
- Returns:
true
if the result of this computation must be rounded to the nearest integer.
-
computeUnitType
public short computeUnitType()Perform a dimensional analysis of this expression and compute the unit type of the result.- Specified by:
computeUnitType
in interfaceCSSMathFunctionValue
- Specified by:
computeUnitType
in interfaceCSSMathValue
- Returns:
- the unit type of the result, as in
CSSUnit
.
-
matches
Description copied from class:StyleValue
Verify if this value matches the given grammar.- Specified by:
matches
in interfaceCSSValue
- Overrides:
matches
in classStyleValue
- Parameters:
syntax
- the syntax.- Returns:
- the matching for the syntax.
-
hashCode
public int hashCode()- Overrides:
hashCode
in classFunctionValue
-
equals
- Overrides:
equals
in classFunctionValue
-
clone
Description copied from class:TypedValue
Creates and returns a copy of this object.The object will be the same except for the
subproperty
flag, that will be disabled in the clone object.- Specified by:
clone
in interfaceCSSFunctionValue
- Specified by:
clone
in interfaceCSSMathFunctionValue
- Specified by:
clone
in interfaceCSSTypedValue
- Specified by:
clone
in interfaceCSSValue
- Overrides:
clone
in classFunctionValue
- Returns:
- a copy of this object.
-