org.translet.processor
Class CompoundPredicateExpr
java.lang.Object
|
+--org.translet.processor.CompoundPredicateExpr
- All Implemented Interfaces:
- PredicateExpr
- public class CompoundPredicateExpr
- extends Object
- implements PredicateExpr
Represents a compound expression involving xpath expressions.
This is a composite of PredicateExpr. A compound
expression can be made up of two other PredicateExpr (either or
both of which can also be another CompoundPredicateExpr).
- Author:
- Karthikeyan M.
CompoundPredicateExpr
public CompoundPredicateExpr(PredicateExpr left,
String operator,
PredicateExpr right)
initialize
public boolean initialize(PredicateContext ctxt,
RuleMonitor rules)
- Description copied from interface:
PredicateExpr
- Initializes and validates (recursively, if required)
the expression and returns the status about if the
expression can be evaluated.
The values passed on the contextNode and the rules
are also the values that are to be used in evaluating
the expression.
The expression is expected to return at the first
place where the initialization fails. In other words,
if the initialization succeeds, all the expressions
were initialized, but, if it fails, not all expressions
might have been evaluated.
- Specified by:
initialize
in interface PredicateExpr
- Following copied from interface:
org.translet.processor.PredicateExpr
- Parameters:
context
- The context for this expression.rules
- Required to make decisions when the expression
is ambiguous. null, if there are no rules required.- Returns:
- true if the expression can be evaluated within the
context of the rules specified.
evaluate
public Object evaluate()
- Description copied from interface:
PredicateExpr
- Evaluates the expression and returns the value.
- Specified by:
evaluate
in interface PredicateExpr
- Following copied from interface:
org.translet.processor.PredicateExpr
- Returns:
- The value for this expression.
toString
public String toString()
- Overrides:
toString
in class Object