Package com.saxonica.ee.optim
Class GeneralComparisonEE
- java.lang.Object
-
- net.sf.saxon.expr.Expression
-
- net.sf.saxon.expr.BinaryExpression
-
- net.sf.saxon.expr.GeneralComparison
-
- com.saxonica.ee.optim.GeneralComparisonEE
-
- All Implemented Interfaces:
Callable
,ComparisonExpression
,ExportAgent
,Locatable
,IdentityComparable
,Traceable
public class GeneralComparisonEE extends GeneralComparison
This class provides an implementation of the GeneralComparison "=" operator, which deals efficiently with comparing two sequences.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sf.saxon.expr.GeneralComparison
GeneralComparison.ComparisonCardinality
-
-
Field Summary
-
Fields inherited from class net.sf.saxon.expr.GeneralComparison
comparer, comparisonCardinality, doneWarnings, needsRuntimeCheck, singletonOperator
-
Fields inherited from class net.sf.saxon.expr.BinaryExpression
operator
-
Fields inherited from class net.sf.saxon.expr.Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
-
-
Constructor Summary
Constructors Constructor Description GeneralComparisonEE(Expression p0, int op, Expression p1)
Create a relational expression identifying the two operands and the operator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Expression
copy(RebindingMap rebindings)
Copy an expression.boolean
effectiveBooleanValue(XPathContext context)
Evaluate the expression in a boolean contextprotected GeneralComparison
getInverseComparison()
Expression
optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType)
Optimize the expressionjava.lang.String
tag()
Get the element name used to identify this expression in exported expression format-
Methods inherited from class net.sf.saxon.expr.GeneralComparison
call, compare, computeCardinality, convertsUntypedToOther, equals, evaluateItem, evaluateManyToMany, explainExtraAttributes, getAtomicComparer, getComparisonCardinality, getCorrespondingSingletonOperator, getExpressionName, getIntrinsicDependencies, getItemType, getNamespaceResolver, getSingletonOperator, getStaticUType, getStreamerName, needsRuntimeCheck, setAtomicComparer, setComparisonCardinality, setNeedsRuntimeCheck, typeCheck
-
Methods inherited from class net.sf.saxon.expr.BinaryExpression
computeHashCode, computeSpecialProperties, displayOperator, export, getImplementationMethod, getLhs, getLhsExpression, getOperandRole, getOperator, getRhs, getRhsExpression, isAssociative, isCommutative, isInverse, operands, setFlattened, setLhsExpression, setRhsExpression, toShortString, toString
-
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointers
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sf.saxon.expr.ComparisonExpression
getLhs, getLhsExpression, getRhs, getRhsExpression
-
Methods inherited from interface net.sf.saxon.trace.Traceable
gatherProperties
-
-
-
-
Constructor Detail
-
GeneralComparisonEE
public GeneralComparisonEE(Expression p0, int op, Expression p1)
Create a relational expression identifying the two operands and the operator- Parameters:
p0
- the left-hand operandop
- the operator, as a token returned by the Tokenizer (e.g. Token.LT)p1
- the right-hand operand
-
-
Method Detail
-
optimize
public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
Description copied from class:GeneralComparison
Optimize the expression- Overrides:
optimize
in classGeneralComparison
- Parameters:
visitor
- an expression visitorcontextItemType
- the static type of "." at the point where this expression is invoked. The parameter is set to null if it is known statically that the context item will be undefined. If the type of the context item is not known statically, the argument is set toType.ITEM_TYPE
- Returns:
- the checked expression
- Throws:
XPathException
- if an error is discovered during this phase (typically a type error)
-
copy
public Expression copy(RebindingMap rebindings)
Description copied from class:Expression
Copy an expression. This makes a deep copy.- Specified by:
copy
in classExpression
- Parameters:
rebindings
- a mutable list of (old binding, new binding) pairs that is used to update the bindings held in any local variable references that are copied.- Returns:
- the copy of the original expression
-
effectiveBooleanValue
public boolean effectiveBooleanValue(XPathContext context) throws XPathException
Evaluate the expression in a boolean context- Overrides:
effectiveBooleanValue
in classGeneralComparison
- Parameters:
context
- the given context for evaluation- Returns:
- a boolean representing the result of the numeric comparison of the two operands
- Throws:
XPathException
- if any dynamic error occurs evaluating the expression
-
getInverseComparison
protected GeneralComparison getInverseComparison()
- Overrides:
getInverseComparison
in classGeneralComparison
-
tag
public java.lang.String tag()
Description copied from class:GeneralComparison
Get the element name used to identify this expression in exported expression format- Overrides:
tag
in classGeneralComparison
- Returns:
- the element name used to identify this expression
-
-