java.lang.Object
io.sf.carte.doc.style.css.property.ExpressionFactory
Expressions factory.
-
Constructor Summary
ConstructorDescriptionExpressionFactory
(LexicalUnit nextLexicalUnit) Creates an expression factory. -
Method Summary
Modifier and TypeMethodDescriptioncreateExpression
(LexicalUnit calcParams) Create an expression from the given lexical unit.protected CSSValueFactory
Get a value factory.Gives the next lexical unit.protected boolean
Check whether this is the expression in acalc()
value or a sub-expression in some mathematical function.protected boolean
isInvalidOperand
(CSSPrimitiveValue primi, LexicalUnit.LexicalType lutype, LexicalUnit.LexicalType lastlutype)
-
Constructor Details
-
ExpressionFactory
Creates an expression factory.- Parameters:
nextLexicalUnit
- the next lexical unit, ornull
if none.
-
-
Method Details
-
getNextLexicalUnit
Gives the next lexical unit. It could be the next lexical unit of the parent value, or an operator that was found while producing an expression.This method should be called after calling
createExpression(LexicalUnit)
, not before.- Returns:
- the next lexical unit.
-
createExpression
Create an expression from the given lexical unit.- Parameters:
calcParams
- the lexical unit(s) of the operands.- Returns:
- the expression.
-
getCSSValueFactory
Get a value factory.- Returns:
- the value factory.
-
isInvalidOperand
protected boolean isInvalidOperand(CSSPrimitiveValue primi, LexicalUnit.LexicalType lutype, LexicalUnit.LexicalType lastlutype) -
isCalcValue
protected boolean isCalcValue()Check whether this is the expression in acalc()
value or a sub-expression in some mathematical function.- Returns:
true
if the expression belongs to acalc()
value.
-