Package net.sf.saxon.expr
Class SingletonIntersectExpression
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.BinaryExpression
net.sf.saxon.expr.VennExpression
net.sf.saxon.expr.SingletonIntersectExpression
- All Implemented Interfaces:
Serializable
,SourceLocator
,LocationProvider
,SaxonLocator
,InstructionInfo
,Locator
This expression is equivalent to (A intersect B) in the case where A has cardinality
zero-or-one. This is handled as a special case because the standard sort-merge algorithm
involves an unnecessary sort on B.
- See Also:
-
Field Summary
Fields inherited from class net.sf.saxon.expr.BinaryExpression
operand0, operand1, operator
Fields inherited from class net.sf.saxon.expr.Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, EVENT_FEED_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, locationId, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, PUSH_SELECTION, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, WATCH_METHOD
-
Constructor Summary
ConstructorsConstructorDescriptionSingletonIntersectExpression
(Expression p1, int op, Expression p2) Special case of an intersect expression where the first argument is a singleton -
Method Summary
Methods inherited from class net.sf.saxon.expr.VennExpression
computeCardinality, computeSpecialProperties, equals, gatherComponents, getItemType, hashCode, optimize, simplify, typeCheck
Methods inherited from class net.sf.saxon.expr.BinaryExpression
explain, explainExtraAttributes, getArguments, getOperands, getOperator, isAssociative, isCommutative, isInverse, iterateSubExpressions, promote, replaceSubExpression, setFlattened, toString
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getImplementationMethod, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setLocationId, staticTypeCheck, suppressValidation, typeError
-
Constructor Details
-
SingletonIntersectExpression
Special case of an intersect expression where the first argument is a singleton- Parameters:
p1
- the first argument, always a singletonop
- the operator, always Token.INTERSECTp2
- the second argument
-
-
Method Details
-
copy
Copy an expression. This makes a deep copy.- Overrides:
copy
in classVennExpression
- Returns:
- the copy of the original expression
-
iterate
Iterate over the value of the expression. The result will always be sorted in document order, with duplicates eliminated- Overrides:
iterate
in classVennExpression
- Parameters:
c
- The context for evaluation- Returns:
- a SequenceIterator representing the union of the two operands
- Throws:
XPathException
- if any dynamic error occurs evaluating the expression
-
effectiveBooleanValue
Get the effective boolean value. In the case of a union expression, this is reduced to an OR expression, for efficiency- Overrides:
effectiveBooleanValue
in classVennExpression
- Parameters:
c
- The context in which the expression is to be evaluated- Returns:
- the effective boolean value
- Throws:
XPathException
- if any dynamic error occurs evaluating the expression
-
getExpressionName
Description copied from class:VennExpression
Get a name identifying the kind of expression, in terms meaningful to a user.- Overrides:
getExpressionName
in classVennExpression
- Returns:
- a name identifying the kind of expression, in terms meaningful to a user. The name will always be in the form of a lexical XML QName, and should match the name used in explain() output displaying the expression.
-
displayOperator
Display the operator used by this binary expression- Overrides:
displayOperator
in classBinaryExpression
- Returns:
- String representation of the operator (for diagnostic display only)
-