com.icl.saxon.expr

Class IsLastExpression

public final class IsLastExpression extends Expression

position()=last() expression
Constructor Summary
IsLastExpression(boolean condition)
Construct a condition that tests position()=last (if condition is true) or position()!
Method Summary
voiddisplay(int level)
Diagnostic print of expression structure
Valueevaluate(Context c)
booleanevaluateAsBoolean(Context c)
booleangetCondition()
intgetDataType()
Determine the data type of the expression
intgetDependencies()
Get the dependencies of this expression on the context
Expressionreduce(int dependencies, Context context)
Perform a partial evaluation of the expression, by eliminating specified dependencies on the context.
Expressionsimplify()

Constructor Detail

IsLastExpression

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

Method Detail

display

public void display(int level)
Diagnostic print of expression structure

evaluate

public Value evaluate(Context c)

evaluateAsBoolean

public boolean evaluateAsBoolean(Context c)

getCondition

public boolean getCondition()

getDataType

public int getDataType()
Determine the data type of the expression

Returns: Value.BOOLEAN

getDependencies

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

reduce

public Expression reduce(int dependencies, Context context)
Perform a partial evaluation of the expression, by eliminating specified dependencies on the context.

Parameters: dependencies The dependencies to be removed context The context to be used for the partial evaluation

Returns: a new expression that does not have any of the specified dependencies

simplify

public Expression simplify()