|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.expr.ComputedExpression
net.sf.saxon.expr.BinaryExpression
net.sf.saxon.expr.ValueComparison
public final class ValueComparison
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
Field Summary |
---|
Fields inherited from class net.sf.saxon.expr.BinaryExpression |
---|
operands, operator |
Fields inherited from class net.sf.saxon.expr.ComputedExpression |
---|
lineNumber, NO_ARGUMENTS, staticProperties |
Constructor Summary | |
---|---|
ValueComparison(Expression p1,
int op,
Expression p2)
Create a relational expression identifying the two operands and the operator |
Method Summary | |
---|---|
Expression |
analyze(StaticContext env)
Type-check the expression |
protected static boolean |
compare(AtomicValue v1,
int op,
AtomicValue v2,
AtomicComparer collator)
Compare two atomic values, using a specified operator and collation |
boolean |
effectiveBooleanValue(XPathContext context)
Evaluate the expression in a boolean context |
Item |
evaluateItem(XPathContext context)
Evaluate the expression in a given context |
ItemType |
getItemType()
Determine the data type of the expression |
Methods inherited from class net.sf.saxon.expr.BinaryExpression |
---|
computeCardinality, display, displayOperator, equals, getSubExpressions, hashCode, isCommutative, promote, setDetails, simplify |
Methods inherited from class net.sf.saxon.expr.ComputedExpression |
---|
computeDependencies, computeSpecialProperties, computeStaticProperties, dynamicError, evaluateAsString, getCardinality, getDependencies, getIntrinsicDependencies, getLineNumber, getSpecialProperties, iterate, markTailFunctionCalls, setLineNumber, typeError |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValueComparison(Expression p1, int op, Expression p2)
p1
- the left-hand operandop
- the operator, as a token returned by the Tokenizer (e.g. Tokenizer.LT)p2
- the right-hand operandMethod Detail |
---|
public Expression analyze(StaticContext env) throws XPathException
analyze
in interface Expression
analyze
in class BinaryExpression
env
- the static context of the expression
XPathException
- if an error is discovered during this phase
(typically a type error)public boolean effectiveBooleanValue(XPathContext context) throws XPathException
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class ComputedExpression
context
- the given context for evaluation
XPathException
- if any dynamic error occurs evaluating the
expressionprotected static boolean compare(AtomicValue v1, int op, AtomicValue v2, AtomicComparer collator) throws XPathException.Type
XPathException.Type
- if the values are not comparablepublic Item evaluateItem(XPathContext context) throws XPathException
evaluateItem
in interface Expression
evaluateItem
in class ComputedExpression
context
- the given context for evaluation
XPathException
- if any dynamic error occurs evaluating the
expressionpublic ItemType getItemType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |