org.ucl.xpath.ast
Class CmpExpr

java.lang.Object
  extended byorg.ucl.xpath.ast.XPathNode
      extended byorg.ucl.xpath.ast.Expr
          extended byorg.ucl.xpath.ast.BinExpr
              extended byorg.ucl.xpath.ast.CmpExpr

public class CmpExpr
extends BinExpr

The comparison of expression operator takes the value of its left operand and compares (dependant on type) against its right operand, according to the rules of the particular comparison rule


Field Summary
static int EQ
          Set internal value for EQ operation.
static int EQUALS
          Set internal value for EQUALS operation.
static int GE
          Set internal value for GE operation.
static int GREATER
          Set internal value for GREATER operation.
static int GREATER_GREATER
          Set internal value for GREATER_GREATER operation.
static int GREATEREQUAL
          Set internal value for GREATEREQUAL operation.
static int GT
          Set internal value for GT operation.
static int IS
          Set internal value for IS operation.
static int LE
          Set internal value for LE operation.
static int LESS_LESS
          Set internal value for LESS_LESS operation.
static int LESSEQUAL
          Set internal value for LESSEQUAL operation.
static int LESSTHAN
          Set internal value for LESSTHAN operation.
static int LT
          Set internal value for LT operation.
static int NE
          Set internal value for NE operation.
static int NOTEQUALS
          Set internal value for NOTEQUALS operation.
 
Constructor Summary
CmpExpr(Expr l, Expr r, int type)
          Constructor for CmpExpr
 
Method Summary
 java.lang.Object accept(XPathVisitor v)
          Support for Visitor interface.
 int type()
           
 
Methods inherited from class org.ucl.xpath.ast.BinExpr
left, right, set_left, set_right
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUALS

public static final int EQUALS
Set internal value for EQUALS operation.

See Also:
Constant Field Values

NOTEQUALS

public static final int NOTEQUALS
Set internal value for NOTEQUALS operation.

See Also:
Constant Field Values

LESSTHAN

public static final int LESSTHAN
Set internal value for LESSTHAN operation.

See Also:
Constant Field Values

LESSEQUAL

public static final int LESSEQUAL
Set internal value for LESSEQUAL operation.

See Also:
Constant Field Values

GREATER

public static final int GREATER
Set internal value for GREATER operation.

See Also:
Constant Field Values

GREATEREQUAL

public static final int GREATEREQUAL
Set internal value for GREATEREQUAL operation.

See Also:
Constant Field Values

EQ

public static final int EQ
Set internal value for EQ operation.

See Also:
Constant Field Values

NE

public static final int NE
Set internal value for NE operation.

See Also:
Constant Field Values

LT

public static final int LT
Set internal value for LT operation.

See Also:
Constant Field Values

LE

public static final int LE
Set internal value for LE operation.

See Also:
Constant Field Values

GT

public static final int GT
Set internal value for GT operation.

See Also:
Constant Field Values

GE

public static final int GE
Set internal value for GE operation.

See Also:
Constant Field Values

IS

public static final int IS
Set internal value for IS operation.

See Also:
Constant Field Values

LESS_LESS

public static final int LESS_LESS
Set internal value for LESS_LESS operation.

See Also:
Constant Field Values

GREATER_GREATER

public static final int GREATER_GREATER
Set internal value for GREATER_GREATER operation.

See Also:
Constant Field Values
Constructor Detail

CmpExpr

public CmpExpr(Expr l,
               Expr r,
               int type)
Constructor for CmpExpr

Parameters:
l - input xpath left expression/variable
r - input xpath right expression/variable
type - what comparison to use l against r.
Method Detail

accept

public java.lang.Object accept(XPathVisitor v)
Support for Visitor interface.

Specified by:
accept in class XPathNode
Returns:
Result of Visitor operation.

type

public int type()
Returns:
comparison type