org.exolab.adaptx.xpath.expressions

Interface Operator

public interface Operator

Represents an Logical or Mathimatical Operator that operates on binary expressions.

Version: $Revision: 3957 $

Author: Keith Visco

Field Summary
static intADD_OPERATOR
The add operator type
static intAND_OPERATOR
The and operator type
static intDIVIDE_OPERATOR
The divide operator type
static intEQUALITY_OPERATOR
The "equality" operator type
static intMODULUS_OPERATOR
The modulus operator type
static intMULTIPLY_OPERATOR
The multiply operator type
static intOR_OPERATOR
The or operator type
static intQUOTIENT_OPERATOR
The quotient operator type
static intSUBTRACT_OPERATOR
The subtract operator type
Method Summary
XPathResultexecute(XPathExpression left, XPathExpression right, XPathContext context)
Executes this operator on the given expressions
XPathResultexecute(XPathResult left, XPathResult right)
Executes this operator on the given XPath values
intgetOperatorType()
Returns the type for this Operator.

Field Detail

ADD_OPERATOR

public static final int ADD_OPERATOR
The add operator type

AND_OPERATOR

public static final int AND_OPERATOR
The and operator type

DIVIDE_OPERATOR

public static final int DIVIDE_OPERATOR
The divide operator type

EQUALITY_OPERATOR

public static final int EQUALITY_OPERATOR
The "equality" operator type

MODULUS_OPERATOR

public static final int MODULUS_OPERATOR
The modulus operator type

MULTIPLY_OPERATOR

public static final int MULTIPLY_OPERATOR
The multiply operator type

OR_OPERATOR

public static final int OR_OPERATOR
The or operator type

QUOTIENT_OPERATOR

public static final int QUOTIENT_OPERATOR
The quotient operator type

SUBTRACT_OPERATOR

public static final int SUBTRACT_OPERATOR
The subtract operator type

Method Detail

execute

public XPathResult execute(XPathExpression left, XPathExpression right, XPathContext context)
Executes this operator on the given expressions

Parameters: left the left-side expression right the right-side expression context the XPathContext

Returns: the XPathResult

Throws: XPathException when an error occurs during execution

execute

public XPathResult execute(XPathResult left, XPathResult right)
Executes this operator on the given XPath values

Parameters: left the left-side expression right the right-side expression

Returns: the XPathResult

Throws: XPathException when an error occurs during execution

getOperatorType

public 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