Package com.saxonica.ee.optim
Class GeneralEqualityEE
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.BinaryExpression
net.sf.saxon.expr.GeneralComparison
com.saxonica.ee.optim.GeneralEqualityEE
- All Implemented Interfaces:
ComparisonExpression,ExportAgent,Locatable,IdentityComparable,Traceable
This class provides an implementation of the GeneralComparison "=" operator, which deals efficiently with
comparing two sequences.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classElaborator for a general comparison expression such as (A = B).Nested classes/interfaces inherited from class net.sf.saxon.expr.GeneralComparison
GeneralComparison.ComparisonCardinality, GeneralComparison.GeneralComparisonElaborator -
Field Summary
Fields inherited from class net.sf.saxon.expr.GeneralComparison
comparer, comparisonCardinality, doneWarnings, runtimeCheckNeeded, singletonOperatorFields inherited from class net.sf.saxon.expr.BinaryExpression
operatorFields 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
ConstructorsConstructorDescriptionGeneralEqualityEE(Expression p0, int op, Expression p1) Create a relational expression identifying the two operands and the operator -
Method Summary
Modifier and TypeMethodDescriptioncopy(RebindingMap rebindings) Copy an expression.booleaneffectiveBooleanValue(XPathContext context) Evaluate the expression in a boolean contextMake an elaborator for this expressionprotected GeneralComparisonoptimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) Optimize the expressionprotected Stringtag()Get the element name used to identify this expression in exported expression formatMethods inherited from class net.sf.saxon.expr.GeneralComparison
compare, computeCardinality, computeHashCode, convertsUntypedToOther, equals, evaluateItem, explainExtraAttributes, getAtomicComparer, getComparisonCardinality, getCorrespondingSingletonOperator, getExpressionName, getIntrinsicDependencies, getItemType, getNamespaceResolver, getSingletonOperator, getStaticUType, getStreamerName, getStringCollator, needsRuntimeCheck, setAtomicComparer, setComparisonCardinality, setNeedsRuntimeCheck, typeCheckMethods inherited from class net.sf.saxon.expr.BinaryExpression
computeSpecialProperties, displayOperator, export, getImplementationMethod, getLhs, getLhsExpression, getOperandRole, getOperator, getRhs, getRhsExpression, isAssociative, isCommutative, isInverse, operands, setFlattened, setLhsExpression, setRhsExpression, toShortString, toStringMethods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dispatchTailCall, dynamicError, evaluateAsString, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, 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, makeElaborator, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, supportsLazyEvaluation, suppressValidation, toPattern, typeCheckChildren, typeError, unordered, verifyParentPointers, withLocationMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.expr.ComparisonExpression
getLhs, getLhsExpression, getRhs, getRhsExpressionMethods inherited from interface net.sf.saxon.trace.Traceable
gatherProperties
-
Constructor Details
-
GeneralEqualityEE
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 Details
-
optimize
public Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException Description copied from class:GeneralComparisonOptimize the expression- Overrides:
optimizein 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
Description copied from class:ExpressionCopy an expression. This makes a deep copy.- Specified by:
copyin 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
Evaluate the expression in a boolean context- Overrides:
effectiveBooleanValuein 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
- Overrides:
getInverseComparisonin classGeneralComparison
-
tag
Description copied from class:GeneralComparisonGet the element name used to identify this expression in exported expression format- Overrides:
tagin classGeneralComparison- Returns:
- the element name used to identify this expression
-
getElaborator
Description copied from class:GeneralComparisonMake an elaborator for this expression- Overrides:
getElaboratorin classGeneralComparison- Returns:
- a suitable elaborator
-