net.sf.saxon.expr

Class ArithmeticExpression10

public class ArithmeticExpression10 extends BinaryExpression

Arithmetic Expression: an expression using one of the operators plus, minus, multiply, div, idiv, mod, in backwards compatibility mode: see ArithmeticExpression for the non-backwards compatible case.
Constructor Summary
ArithmeticExpression10(Expression p0, int operator, Expression p1)
Create an arithmetic expression to be evaluated in XPath 1.0 mode
Method Summary
Expressioncopy()
Copy an expression.
ItemevaluateItem(XPathContext context)
Evaluate the expression.
ItemTypegetItemType(TypeHierarchy th)
Determine the data type of the expression, if this is known statically
booleanisBackwardsCompatible()
Determine whether the expression is to be evaluated in backwards-compatible mode
ExpressiontypeCheck(ExpressionVisitor visitor, ItemType contextItemType)
Type-check the expression statically.

Constructor Detail

ArithmeticExpression10

public ArithmeticExpression10(Expression p0, int operator, Expression p1)
Create an arithmetic expression to be evaluated in XPath 1.0 mode

Parameters: p0 the first operand operator the operator, for example PLUS p1 the second operand

Method Detail

copy

public Expression copy()
Copy an expression. This makes a deep copy.

Returns: the copy of the original expression

evaluateItem

public Item evaluateItem(XPathContext context)
Evaluate the expression.

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the data type of the expression, if this is known statically

isBackwardsCompatible

public boolean isBackwardsCompatible()
Determine whether the expression is to be evaluated in backwards-compatible mode

Returns: true, always

typeCheck

public Expression typeCheck(ExpressionVisitor visitor, ItemType contextItemType)
Type-check the expression statically. We try to work out which particular arithmetic function to use if the types of operands are known an compile time.