java.io.Serializable
, javax.xml.transform.SourceLocator
, Container
, Expression
, InstructionInfoProvider
public class VennExpression extends BinaryExpression
operand0, operand1, operator
locationId, staticProperties
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
Constructor | Description |
---|---|
VennExpression(Expression p1,
int op,
Expression p2) |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
int |
computeCardinality() |
Determine the static cardinality of the expression
|
int |
computeSpecialProperties() |
Get the static properties of this expression (other than its type).
|
boolean |
effectiveBooleanValue(XPathContext context) |
Get the effective boolean value.
|
ItemType |
getItemType(TypeHierarchy th) |
Determine the data type of the items returned by this expression
|
int |
hashCode() |
Is this expression the same as another expression?
|
SequenceIterator |
iterate(XPathContext c) |
Iterate over the value of the expression.
|
Expression |
simplify(StaticContext env) |
Simplify the expression
|
Expression |
typeCheck(StaticContext env,
ItemType contextItemType) |
Type-check the expression
|
display, displayOperator, equals, getOperands, getOperator, isAssociative, isCommutative, isInverse, iterateSubExpressions, optimize, promote, replaceSubExpression
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, evaluateAsString, evaluateItem, getCardinality, getColumnNumber, getConstructType, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation, typeError
public VennExpression(Expression p1, int op, Expression p2)
p1
- the left-hand operandop
- the operator (union, intersection, or difference)p2
- the right-hand operandpublic final ItemType getItemType(TypeHierarchy th)
th
- public final int computeCardinality()
computeCardinality
in class BinaryExpression
public int computeSpecialProperties()
computeSpecialProperties
in class BinaryExpression
StaticProperty.NON_CREATIVE
. This is overridden
for some subclasses.public Expression simplify(StaticContext env) throws XPathException
simplify
in interface Expression
simplify
in class BinaryExpression
env
- the static contextXPathException
- if an error is discovered during expression
rewritingpublic Expression typeCheck(StaticContext env, ItemType contextItemType) throws XPathException
typeCheck
in interface Expression
typeCheck
in class BinaryExpression
env
- the static context of the expressioncontextItemType
- 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
StaticError
- if an error is discovered during this phase
(typically a type error)XPathException
public int hashCode()
hashCode
in class BinaryExpression
public SequenceIterator iterate(XPathContext c) throws XPathException
iterate
in interface Expression
iterate
in class ComputedExpression
c
- The context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic boolean effectiveBooleanValue(XPathContext context) throws XPathException
effectiveBooleanValue
in interface Expression
effectiveBooleanValue
in class ComputedExpression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expression