public class SingletonIntersectExpression extends VennExpression
operator
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 and Description |
---|
SingletonIntersectExpression(Expression p1,
int op,
Expression p2)
Special case of an intersect expression where the first argument is a singleton
|
Modifier and Type | Method and Description |
---|---|
static boolean |
containsNode(SequenceIterator iter,
NodeInfo m)
Ask whether the sequence supplied in the first argument contains the node
supplied in the second
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
protected java.lang.String |
displayOperator()
Display the operator used by this binary expression
|
boolean |
effectiveBooleanValue(XPathContext c)
Get the effective boolean value.
|
java.lang.String |
getExpressionName()
Get a name identifying the kind of expression, in terms meaningful to a user.
|
SequenceIterator<?> |
iterate(XPathContext c)
Iterate over the value of the expression.
|
Expression |
optimize(ExpressionVisitor visitor,
ContextItemStaticInfo contextItemType)
Perform optimisation of an expression and its subexpressions.
|
Expression |
simplify()
Simplify the expression
|
protected java.lang.String |
tag()
Get the element name used to identify this expression in exported expression format
|
computeCardinality, computeHashCode, computeSpecialProperties, equals, gatherComponents, getImplementationMethod, getItemType, getOperandRole, getStaticUType, getStreamerName, toPattern, typeCheck, unordered
explainExtraAttributes, export, getLhs, getLhsExpression, getOperator, getRhs, getRhsExpression, isAssociative, isCommutative, isInverse, operands, setFlattened, setLhsExpression, setRhsExpression, toShortString, toString
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dynamicError, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimizeChildren, prepareForStreaming, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplifyChildren, staticTypeCheck, suppressValidation, typeCheckChildren, typeError, verifyParentPointers
public SingletonIntersectExpression(Expression p1, int op, Expression p2)
p1
- the first argument, always a singletonop
- the operator, always Token.INTERSECTp2
- the second argumentpublic Expression simplify() throws XPathException
simplify
in class VennExpression
XPathException
- if an error is discovered during expression
rewritingpublic Expression optimize(ExpressionVisitor visitor, ContextItemStaticInfo contextItemType) throws XPathException
This method is called after all references to functions and variables have been resolved to the declaration of the function or variable, and after all type checking has been done.
optimize
in class VennExpression
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 to
Type.ITEM_TYPE
XPathException
- if an error is discovered during this phase
(typically a type error)public Expression copy(RebindingMap rebindings)
copy
in class VennExpression
rebindings
- public SequenceIterator<?> iterate(XPathContext c) throws XPathException
iterate
in class VennExpression
c
- The context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic boolean effectiveBooleanValue(XPathContext c) throws XPathException
effectiveBooleanValue
in class VennExpression
c
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic static boolean containsNode(SequenceIterator iter, NodeInfo m) throws XPathException
iter
- an iterator over nodes. The iterator will be closed if the node is found.m
- the node to be testedXPathException
- if evaluating the iterator failspublic java.lang.String getExpressionName()
VennExpression
getExpressionName
in class VennExpression
protected java.lang.String displayOperator()
displayOperator
in class BinaryExpression
protected java.lang.String tag()
tag
in class VennExpression
Copyright (c) 2004-2020 Saxonica Limited. All rights reserved.