|
|||||||||
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.GeneralComparison
public class GeneralComparison
GeneralComparison: a boolean expression that compares two expressions for equals, not-equals, greater-than or less-than. This implements the operators =, !=, <, >, etc.
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 | |
---|---|
GeneralComparison(Expression p0,
int op,
Expression p1)
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 a1,
int operator,
AtomicValue a2,
AtomicComparer comparer,
boolean backwardsCompatible)
Compare two atomic values |
protected String |
displayOperator()
|
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 |
void |
setDetails(Expression p0,
int op,
Expression p1)
Identify the two operands and the operator (for use when the default constructor was used) |
Methods inherited from class net.sf.saxon.expr.BinaryExpression |
---|
computeCardinality, display, equals, getSubExpressions, hashCode, isCommutative, promote, 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 GeneralComparison(Expression p0, int op, Expression p1)
p0
- the left-hand operandop
- the operator, as a token returned by the Tokenizer (e.g. Tokenizer.LT)p1
- the right-hand operandMethod Detail |
---|
public void setDetails(Expression p0, int op, Expression p1)
BinaryExpression
setDetails
in class BinaryExpression
p0
- the left-hand operandop
- the operator, as a token returned by the Tokenizer (e.g. Tokenizer.AND)p1
- the right-hand operandpublic 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 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 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 a1, int operator, AtomicValue a2, AtomicComparer comparer, boolean backwardsCompatible) throws XPathException
XPathException
public ItemType getItemType()
protected String displayOperator()
displayOperator
in class BinaryExpression
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |