| java.lang.Object net.sf.saxon.expr.ComputedExpression net.sf.saxon.expr.BinaryExpression net.sf.saxon.expr.ValueComparison
ValueComparison | final public class ValueComparison extends BinaryExpression (Code) | | ValueComparison: a boolean expression that compares two atomic values
for equals, not-equals, greater-than or less-than. Implements the operators
eq, ne, lt, le, gt, ge
|
Constructor Summary | |
public | ValueComparison(Expression p1, int op, Expression p2) Create a relational expression identifying the two operands and the operator
Parameters: p1 - the left-hand operand Parameters: op - the operator, as a token returned by the Tokenizer (e.g. |
ValueComparison | public ValueComparison(Expression p1, int op, Expression p2)(Code) | | Create a relational expression identifying the two operands and the operator
Parameters: p1 - the left-hand operand Parameters: op - the operator, as a token returned by the Tokenizer (e.g. Token.LT) Parameters: p2 - the right-hand operand |
effectiveBooleanValue | public boolean effectiveBooleanValue(XPathContext context) throws XPathException(Code) | | Evaluate the expression in a boolean context
Parameters: context - the given context for evaluation a boolean representing the result of the numeric comparison of the two operands |
evaluateItem | public Item evaluateItem(XPathContext context) throws XPathException(Code) | | Evaluate the expression in a given context
Parameters: context - the given context for evaluation a BooleanValue representing the result of the numeric comparison of the two operands,or null representing the empty sequence |
negate | public ValueComparison negate()(Code) | | Return the negation of this value comparison: that is, a value comparison that returns true()
if and only if the original returns false()
|
optimize | public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType) throws XPathException(Code) | | Perform optimisation of an expression and its subexpressions.
This method is called after all references to functions and variables have been resolved
to the declaration of the function or variable, and after all type checking has been done.
Parameters: opt - the optimizer in use. This provides access to supporting functions; it also allowsdifferent optimization strategies to be used in different circumstances. Parameters: env - the static context of the expression Parameters: contextItemType - the static type of "." at the point where this expression is invoked.The parameter is set to null if it is known statically that the context item will be undefined.If the type of the context item is not known statically, the argument is set tonet.sf.saxon.type.Type.ITEM_TYPE the original expression, rewritten if appropriate to optimize execution throws: net.sf.saxon.trans.StaticError - if an error is discovered during this phase(typically a type error) |
|
|