|
||||||||||
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 ComparisonExpression
public int getSingletonOperator()
ComparisonExpression
getSingletonOperator
in interface ComparisonExpression
public boolean convertsUntypedToOther()
convertsUntypedToOther
in interface ComparisonExpression
public int computeCardinality()
computeCardinality
in class BinaryExpression
public ItemType getItemType(TypeHierarchy th)
getItemType
in interface Expression
th
-
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 java.lang.String displayOperator()
displayOperator
in class BinaryExpression
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |