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 int
The add operator typestatic final int
The and operator typestatic final int
The divide operator typestatic final int
The "equality" operator typestatic final int
The modulus operator typestatic final int
The multiply operator typestatic final int
The or operator typestatic final int
The quotient operator typestatic final int
The 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 valuesint
Returns 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
-