net.sf.saxon.expr

Class IsLastExpression

public final class IsLastExpression extends ComputedExpression

A position() eq last() expression, generated by the optimizer.
Constructor Summary
IsLastExpression(boolean condition)
Construct a condition that tests position() eq last() (if condition is true) or position() ne last() (if condition is false).
Method Summary
intcomputeCardinality()
Determine the static cardinality
intcomputeSpecialProperties()
Determine the special properties of this expression
voiddisplay(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure
ItemevaluateItem(XPathContext c)
booleangetCondition()
intgetIntrinsicDependencies()
Get the dependencies of this expression on the context
ItemTypegetItemType(TypeHierarchy th)
Determine the data type of the expression
Expressionoptimize(Optimizer opt, StaticContext env, ItemType contextItemType)
Expressionsimplify(StaticContext env)
ExpressiontypeCheck(StaticContext env, ItemType contextItemType)

Constructor Detail

IsLastExpression

public IsLastExpression(boolean condition)
Construct a condition that tests position() eq last() (if condition is true) or position() ne last() (if condition is false).

Method Detail

computeCardinality

public int computeCardinality()
Determine the static cardinality

computeSpecialProperties

public int computeSpecialProperties()
Determine the special properties of this expression

Returns: NON_CREATIVE.

display

public void display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure

evaluateItem

public Item evaluateItem(XPathContext c)

getCondition

public boolean getCondition()

getIntrinsicDependencies

public int getIntrinsicDependencies()
Get the dependencies of this expression on the context

getItemType

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

Parameters: th

Returns: Type.BOOLEAN

optimize

public Expression optimize(Optimizer opt, StaticContext env, ItemType contextItemType)

simplify

public Expression simplify(StaticContext env)

typeCheck

public Expression typeCheck(StaticContext env, ItemType contextItemType)