public class ConditionEvaluator
ConditionEvaluator is a member class of the Worklet Dynamic Selection
Service. It is used here by the RdrNode class to evaluate the its condition
and thus allow the rule traversal to occur.
It takes an expression (provided as a String) and evaluates it
to a boolean value. The datalist member is a JDOM Element that, if
supplied, will be used to retrieve values for any variable names used
in the expression.
The expression may contain the following operators:
- Arithmetic: * / + -
- Comparison: = != > < >= <=
- Logical: & | !
The order of precedence observed is:
1. * /
2. + -
3. the comparison operators
4. the logical operators
Operands may be numeric literals, string literals or variable names.
Parentheses may be used to group sub-expressions.
An RdrConditionException will be raised if the expression is malformed or
does not evaluate to a boolean value (see getMessage() for the kinds of
things that can go wrong).