public class ExpressionEvaluator extends Object implements Serializable
TargetDependingParameter. Constants may be
specified in the basic properties of the evaluator.| Modifier and Type | Field and Description |
|---|---|
private ExpressionNode |
expression
The parsable double expression.
|
private String |
root
The string used for parsing.
|
| Constructor and Description |
|---|
ExpressionEvaluator(String init)
Constructs a new expression evaluator.
|
| Modifier and Type | Method and Description |
|---|---|
Boolean |
calculateBoolean(GlobalGrouping set)
Returns the actual value of the expression if the target is of no
importance.
|
Boolean |
calculateBoolean(GlobalGrouping set,
TargetDefinition target,
Map<String,Object> base)
Returns the actual value of the expression.
|
Number |
calculateNumber(GlobalGrouping set)
Returns the actual value of the expression if the target is of no
importance.
|
Number |
calculateNumber(GlobalGrouping set,
TargetDefinition target,
Map<String,Object> base)
Returns the actual value of the expression.
|
private String |
fillExpression(GlobalGrouping set,
TargetDefinition target,
Map<String,Object> base) |
ExpressionNode |
getExpression()
Returns the initial expression.
|
void |
initEvaluator(String node)
Initializes the expression.
|
private transient ExpressionNode expression
private String root
public ExpressionEvaluator(String init)
public void initEvaluator(String node)
#evaluate method. Proper parsing is only possible if the argument
follows the generic ExpressionNode specification.node - A String expression.public Number calculateNumber(GlobalGrouping set)
public Boolean calculateBoolean(GlobalGrouping set)
public Number calculateNumber(GlobalGrouping set, TargetDefinition target, Map<String,Object> base)
TargetDependingParameters are evaluted using the target
definition. Variable names must either be substitutable from the
parameter cluster handed over or specified as constants in the
DTDConstants.CONSTANT section of the merit. The
sequence of parameter substitution first looks up the merit's constant.
Only if the variable is not a defined constant, it is evaluated using the
parameter set.public Boolean calculateBoolean(GlobalGrouping set, TargetDefinition target, Map<String,Object> base)
TargetDependingParameters are evaluted using the target
definition. Variable names must either be substitutable from the
parameter cluster handed over or specified as constants in the
DTDConstants.CONSTANT section of the merit. The
sequence of parameter substitution first looks up the merit's constant.
Only if the variable is not a defined constant, it is evaluated using the
parameter set.private String fillExpression(GlobalGrouping set, TargetDefinition target, Map<String,Object> base)
public ExpressionNode getExpression()