net.sf.saxon.expr

Class IdentityComparison

public final class IdentityComparison extends BinaryExpression

IdentityComparison: a boolean expression that compares two nodes for equals, not-equals, greater-than or less-than based on identity and document ordering
Constructor Summary
IdentityComparison(Expression p1, int op, Expression p2)
Create an identity comparison identifying the two operands and the operator
Method Summary
booleaneffectiveBooleanValue(XPathContext context)
ItemevaluateItem(XPathContext context)
Evaluate the expression
ItemTypegetItemType(TypeHierarchy th)
Determine the data type of the expression
voidsetGenerateIdEmulation(boolean flag)
Set flag to indicate different empty-sequence behavior when emulating comparison of two generate-id's
ExpressiontypeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression

Constructor Detail

IdentityComparison

public IdentityComparison(Expression p1, int op, Expression p2)
Create an identity comparison identifying the two operands and the operator

Parameters: p1 the left-hand operand op the operator, as a token returned by the Tokenizer (e.g. Token.LT) p2 the right-hand operand

Method Detail

effectiveBooleanValue

public boolean effectiveBooleanValue(XPathContext context)

evaluateItem

public Item evaluateItem(XPathContext context)
Evaluate the expression

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the data type of the expression

Parameters: th

Returns: Type.BOOLEAN

setGenerateIdEmulation

public void setGenerateIdEmulation(boolean flag)
Set flag to indicate different empty-sequence behavior when emulating comparison of two generate-id's

typeCheck

public Expression typeCheck(StaticContext env, ItemType contextItemType)
Type-check the expression