Class EqualOperator
java.lang.Object
org.pentaho.reporting.libraries.formula.operators.EqualOperator
- All Implemented Interfaces:
Serializable,InfixOperator
Creation-Date: 31.10.2006, 16:34:11
- Author:
- Thomas Morgner
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(FormulaContext context, TypeValuePair value1, TypeValuePair value2) Evaluates the comptuation for both parameters.intgetLevel()booleanDefines, whether the operation is associative.booleanDefines the bind-direction of the operator.toString()
-
Constructor Details
-
EqualOperator
public EqualOperator()
-
-
Method Details
-
evaluate
public TypeValuePair evaluate(FormulaContext context, TypeValuePair value1, TypeValuePair value2) throws EvaluationException Description copied from interface:InfixOperatorEvaluates the comptuation for both parameters. This method must never return null.- Specified by:
evaluatein interfaceInfixOperator- Parameters:
context-value1-value2-- Returns:
- Throws:
EvaluationException
-
getLevel
public int getLevel()- Specified by:
getLevelin interfaceInfixOperator
-
toString
-
isLeftOperation
public boolean isLeftOperation()Description copied from interface:InfixOperatorDefines the bind-direction of the operator. That direction defines, in which direction a sequence of equal operators is resolved.- Specified by:
isLeftOperationin interfaceInfixOperator- Returns:
- true, if the operation is left-binding, false if right-binding
-
isAssociative
public boolean isAssociative()Defines, whether the operation is associative. For associative operations, the evaluation order does not matter, if the operation appears more than once in an expression, and therefore we can optimize them a lot better than non-associative operations (ie. merge constant parts and precompute them once).- Specified by:
isAssociativein interfaceInfixOperator- Returns:
- true, if the operation is associative, false otherwise
-