- All Known Subinterfaces:
AlgebraicExpression,CSSOperandExpression
public interface CSSExpression
Implemented by CSS expressions. See
CSS Values and Units Module
Level 3: Mathematical Expressions
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumEnumeration of expression parts (operations, operands). -
Method Summary
Modifier and TypeMethodDescriptionclone()Create and return a copy of this object.Get a string representation of the expression.Get a minified string representation of the expression.Get the parent expression.Get the type ofCSSExpression.AlgebraicPart.booleanIs this an inverse operation ?voidwriteCssText(SimpleWriter wri) Serialize this expression to aSimpleWriter.
-
Method Details
-
getCssText
String getCssText()Get a string representation of the expression.- Returns:
- a string representation of the expression.
-
getMinifiedCssText
String getMinifiedCssText()Get a minified string representation of the expression.- Returns:
- a minified string representation of the expression.
-
writeCssText
Serialize this expression to aSimpleWriter.- Parameters:
wri- the SimpleWriter.- Throws:
IOException- if an error happened while writing.
-
getParentExpression
CSSExpression getParentExpression()Get the parent expression. In a nested expression, the outer expression is the parent.
For example, in
a * (b + c), being the sum(b + c)this expression, its parent would be the product bya.- Returns:
- the parent expression,
nullif none (this is root expression).
-
isInverseOperation
boolean isInverseOperation()Is this an inverse operation ?If there is a containing operation, the inverse is from the point of view of the parent operation. In a sum (or a product contained inside a sum), the inverse means that the minus sign applies to the whole operation. In a product it is a division.
- Returns:
trueif the operation is inverse.
-
getPartType
CSSExpression.AlgebraicPart getPartType()Get the type ofCSSExpression.AlgebraicPart.- Returns:
- the type of part (operation, operand).
-
clone
CSSExpression clone()Create and return a copy of this object.- Returns:
- a copy of this object.
-