|
||||||||||
| 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.SingletonComparison
Class to handle comparisons of singletons. Unlike ValueComparison, this class converts untyped atomic values to the type of the other argument, and returns false (rather than ()) if either operand is ().
| Field Summary |
| Fields inherited from class net.sf.saxon.expr.BinaryExpression |
operand0, operand1, operator |
| Fields inherited from class net.sf.saxon.expr.ComputedExpression |
locationId, staticProperties |
| Fields inherited from interface net.sf.saxon.expr.Expression |
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD |
| Constructor Summary | |
SingletonComparison(Expression p1,
int operator,
Expression p2)
|
|
| Method Summary | |
int |
computeCardinality()
Determine the static cardinality. |
boolean |
convertsUntypedToOther()
Determine whether untyped atomic values should be converted to the type of the other operand |
protected java.lang.String |
displayOperator()
|
boolean |
effectiveBooleanValue(XPathContext context)
Evaluate the expression in a boolean context |
Item |
evaluateItem(XPathContext context)
Evaluate the expression in a given context |
AtomicComparer |
getAtomicComparer()
Get the AtomicComparer used to compare atomic values. |
ItemType |
getItemType(TypeHierarchy th)
Determine the data type of the expression |
int |
getSingletonOperator()
Get the primitive (singleton) operator used: one of Token.FEQ, Token.FNE, Token.FLT, Token.FGT, Token.FLE, Token.FGE |
void |
setComparator(AtomicComparer comp,
XPathContext context)
|
| Methods inherited from class net.sf.saxon.expr.BinaryExpression |
computeSpecialProperties, display, equals, getOperands, getOperator, hashCode, isAssociative, isCommutative, isInverse, iterateSubExpressions, optimize, promote, replaceSubExpression, simplify, typeCheck |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.sf.saxon.expr.ComparisonExpression |
getOperands |
| Constructor Detail |
public SingletonComparison(Expression p1,
int operator,
Expression p2)
| Method Detail |
public void setComparator(AtomicComparer comp,
XPathContext context)
public AtomicComparer getAtomicComparer()
ComparisonExpression
getAtomicComparer in interface ComparisonExpressionpublic int getSingletonOperator()
ComparisonExpression
getSingletonOperator in interface ComparisonExpressionpublic boolean convertsUntypedToOther()
convertsUntypedToOther in interface ComparisonExpressionpublic int computeCardinality()
computeCardinality in class BinaryExpressionpublic ItemType getItemType(TypeHierarchy th)
getItemType in interface Expressionth -
public Item evaluateItem(XPathContext context)
throws XPathException
evaluateItem in interface ExpressionevaluateItem in class ComputedExpressioncontext - the given context for evaluation
XPathException - if any dynamic error occurs evaluating the
expression
public boolean effectiveBooleanValue(XPathContext context)
throws XPathException
effectiveBooleanValue in interface ExpressioneffectiveBooleanValue in class ComputedExpressioncontext - the given context for evaluation
XPathException - if any dynamic error occurs evaluating the
expressionprotected java.lang.String displayOperator()
displayOperator in class BinaryExpression
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||