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.MathFunctionNested 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.shortPerform a dimensional analysis of this expression and compute the unit type of the result.booleanGet the function type.intGives the index of this mathematical function.inthashCode()booleanWhether this value expects an integer result that must be rounded.matches(CSSValueSyntax syntax) Verify if this value matches the given grammar.voidThis 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, writeCssTextMethods inherited from class io.sf.carte.doc.style.css.property.TypedValue
getCssValueType, getFloatValue, isNumberZeroMethods inherited from class io.sf.carte.doc.style.css.property.PrimitiveValue
getPrecedingComments, getPrimitiveType, getTrailingComments, isPrimitiveValue, isSubproperty, setSubpropertyMethods inherited from class io.sf.carte.doc.style.css.property.StyleValue
isSystemDefault, setCssText, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.CSSFunctionValue
getArguments, getFunctionNameMethods inherited from interface io.sf.carte.doc.style.css.CSSPrimitiveValue
getUnitType, isNegativeNumber, isPrimitiveValueMethods inherited from interface io.sf.carte.doc.style.css.CSSTypedValue
getFloatValue, getFloatValue, getStringValue, isCalculatedNumber, isNumberZero, setFloatValue, setStringValue, toRGBColor, toRGBColorValueMethods inherited from interface io.sf.carte.doc.style.css.CSSValue
getCssText, getCssValueType, getMinifiedCssText, getMinifiedCssText, getPrecedingComments, getPrimitiveType, getTrailingComments, setCssText, writeCssText
-
Method Details
-
getFunction
Description copied from interface:CSSMathFunctionValueGet the function type.- Specified by:
getFunctionin interfaceCSSMathFunctionValue- Returns:
- the function type.
-
getFunctionIndex
public int getFunctionIndex()Gives the index of this mathematical function.- Specified by:
getFunctionIndexin interfaceCSSMathFunctionValue- Returns:
- the function index.
-
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- Overrides:
setExpectIntegerin classPrimitiveValue
-
isExpectingInteger
public boolean isExpectingInteger()Description copied from interface:CSSMathValueWhether this value expects an integer result that must be rounded.- Specified by:
isExpectingIntegerin interfaceCSSMathValue- Returns:
trueif 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:
computeUnitTypein interfaceCSSMathFunctionValue- Specified by:
computeUnitTypein interfaceCSSMathValue- Returns:
- the unit type of the result, as in
CSSUnit.
-
matches
Description copied from class:StyleValueVerify if this value matches the given grammar.- Specified by:
matchesin interfaceCSSValue- Overrides:
matchesin classStyleValue- Parameters:
syntax- the syntax.- Returns:
- the matching for the syntax.
-
hashCode
public int hashCode()- Overrides:
hashCodein classFunctionValue
-
equals
- Overrides:
equalsin classFunctionValue
-
clone
Description copied from class:TypedValueCreates 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 interfaceCSSFunctionValue- Specified by:
clonein interfaceCSSMathFunctionValue- Specified by:
clonein interfaceCSSTypedValue- Specified by:
clonein interfaceCSSValue- Overrides:
clonein classFunctionValue- Returns:
- a copy of this object.
-