Interface Operator
public interface Operator
Represents an Logical or Mathimatical Operator that operates
on binary expressions.
- Version:
- $Revision: 3957 $
- Author:
- Keith Visco
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe add operator typestatic final intThe and operator typestatic final intThe divide operator typestatic final intThe "equality" operator typestatic final intThe modulus operator typestatic final intThe multiply operator typestatic final intThe or operator typestatic final intThe quotient operator typestatic final intThe subtract operator type -
Method Summary
Modifier and TypeMethodDescriptionexecute(XPathExpression left, XPathExpression right, XPathContext context) Executes this operator on the given expressionsexecute(XPathResult left, XPathResult right) Executes this operator on the given XPath valuesintReturns the type for this Operator.
-
Field Details
-
ADD_OPERATOR
static final int ADD_OPERATORThe add operator type- See Also:
-
AND_OPERATOR
static final int AND_OPERATORThe and operator type- See Also:
-
DIVIDE_OPERATOR
static final int DIVIDE_OPERATORThe divide operator type- See Also:
-
EQUALITY_OPERATOR
static final int EQUALITY_OPERATORThe "equality" operator type- See Also:
-
MODULUS_OPERATOR
static final int MODULUS_OPERATORThe modulus operator type- See Also:
-
MULTIPLY_OPERATOR
static final int MULTIPLY_OPERATORThe multiply operator type- See Also:
-
OR_OPERATOR
static final int OR_OPERATORThe or operator type- See Also:
-
QUOTIENT_OPERATOR
static final int QUOTIENT_OPERATORThe quotient operator type- See Also:
-
SUBTRACT_OPERATOR
static final int SUBTRACT_OPERATORThe subtract operator type- See Also:
-
-
Method Details
-
getOperatorType
int getOperatorType()Returns the type for this Operator. The operator type may be one of the pre-defined types, or a user-defined type.- Returns:
- the operator type
-
execute
XPathResult execute(XPathExpression left, XPathExpression right, XPathContext context) throws XPathException Executes this operator on the given expressions- Parameters:
left- the left-side expressionright- the right-side expressioncontext- the XPathContext- Returns:
- the XPathResult
- Throws:
XPathException- when an error occurs during execution
-
execute
Executes this operator on the given XPath values- Parameters:
left- the left-side expressionright- the right-side expression- Returns:
- the XPathResult
- Throws:
XPathException- when an error occurs during execution
-