|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectnet.sf.saxon.expr.Expression
net.sf.saxon.expr.BinaryExpression
net.sf.saxon.expr.SingletonComparison
public class 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.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 |
Expression |
copy()
Copy an expression. |
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 |
setAtomicComparer(AtomicComparer comp)
|
| Methods inherited from class net.sf.saxon.expr.BinaryExpression |
|---|
computeSpecialProperties, equals, explain, getOperands, getOperator, hashCode, iterateSubExpressions, optimize, promote, replaceSubExpression, setFlattened, simplify, toString, typeCheck |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, 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 setAtomicComparer(AtomicComparer comp)
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 BinaryExpressionStaticProperty.ALLOWS_ZERO_OR_ONE,
StaticProperty.EXACTLY_ONE, StaticProperty.ALLOWS_ONE_OR_MORE,
StaticProperty.ALLOWS_ZERO_OR_MOREpublic ItemType getItemType(TypeHierarchy th)
getItemType in class Expressionth - the type hierarchy cache
public Expression copy()
copy in class Expression
public Item evaluateItem(XPathContext context)
throws XPathException
evaluateItem in interface EvaluableItemevaluateItem in class Expressioncontext - the given context for evaluation
XPathException - if any dynamic error occurs evaluating the
expression
public boolean effectiveBooleanValue(XPathContext context)
throws XPathException
effectiveBooleanValue in class Expressioncontext - the given context for evaluation
XPathException - if any dynamic error occurs evaluating the
expression
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||