jd.xml.xpath.expr.operator
Class NumericOperator
java.lang.Object
jd.xml.xpath.expr.ExpressionImpl
jd.xml.xpath.expr.NumericExpression
jd.xml.xpath.expr.operator.NumericOperator
- All Implemented Interfaces:
- Expression, Operator
- Direct Known Subclasses:
- Add, Divide, Modulo, Multiply, Subtract
- public abstract class NumericOperator
- extends NumericExpression
- implements Operator
NumericOperator is a base class for numeric operations.
Methods inherited from interface jd.xml.xpath.expr.Expression |
accept, getResultType, hasContextDependencies, isUniqueFilter, matchesFilter, toBooleanValue, toNode, toNodeSet, toString, toStringValue, toXObject |
lhs_
protected final Expression lhs_
rhs_
protected final Expression rhs_
NumericOperator
public NumericOperator(Expression lhs,
Expression rhs)
- Create a NumericExpression.
getContextDependencies
public int getContextDependencies()
- Description copied from interface:
Expression
- Return a bitfield indicating the expression dependencies
on the XPath context.
- Specified by:
getContextDependencies
in interface Expression
toNumberValue
public double toNumberValue(XPathContext context)
- Description copied from interface:
Expression
- Evaluate the Expression to a number.
- Specified by:
toNumberValue
in interface Expression
- Specified by:
toNumberValue
in class NumericExpression
toNumberValue
protected abstract double toNumberValue(double n1,
double n2)
- Evaluate the expression.