Class Term
java.lang.Object
org.pentaho.reporting.libraries.formula.lvalues.AbstractLValue
org.pentaho.reporting.libraries.formula.lvalues.Term
- All Implemented Interfaces:
Serializable
,Cloneable
,LValue
An term is a list of LValues connected by operators. For the sake of efficiency, this is not stored as tree. We store
the term as a list in the following format: (headValue)(OP value)* ...
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(InfixOperator operator, LValue operand) clone()
evaluate()
LValue[]
Returns any dependent lvalues (parameters and operands, mostly).LValue[]
Allows access to the post optimized head value note that without the optimization, it's difficult to traverse libformula's object model.void
initialize
(FormulaContext context) boolean
Checks whether the LValue is constant.toString()
Methods inherited from class org.pentaho.reporting.libraries.formula.lvalues.AbstractLValue
getContext, getValueType, setParsePosition
-
Constructor Details
-
Term
-
-
Method Details
-
evaluate
- Throws:
EvaluationException
-
add
-
initialize
- Specified by:
initialize
in interfaceLValue
- Overrides:
initialize
in classAbstractLValue
- Throws:
EvaluationException
-
getChildValues
Returns any dependent lvalues (parameters and operands, mostly).- Specified by:
getChildValues
in interfaceLValue
- Overrides:
getChildValues
in classAbstractLValue
- Returns:
-
toString
-
isConstant
public boolean isConstant()Checks whether the LValue is constant. Constant lvalues always return the same value.- Returns:
-
clone
- Specified by:
clone
in interfaceLValue
- Overrides:
clone
in classAbstractLValue
- Throws:
CloneNotSupportedException
-
getOperands
-
getOperators
-
getHeadValue
-
getOptimizedHeadValue
Allows access to the post optimized head value note that without the optimization, it's difficult to traverse libformula's object model.- Returns:
- optimized head value
-
getParsePosition
- Specified by:
getParsePosition
in interfaceLValue
- Overrides:
getParsePosition
in classAbstractLValue
-