org.basex.query.expr
Enum CmpV.OpV

java.lang.Object
  extended by java.lang.Enum<CmpV.OpV>
      extended by org.basex.query.expr.CmpV.OpV
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<CmpV.OpV>
Enclosing class:
CmpV

public static enum CmpV.OpV
extends java.lang.Enum<CmpV.OpV>

Comparators.


Enum Constant Summary
EQ
          Item comparison:equal.
GE
          Item comparison:greater of equal.
GT
          Item comparison:greater.
LE
          Item comparison:less or equal.
LT
          Item comparison:less.
NE
          Item comparison:not equal.
 
Field Summary
 java.lang.String name
          String representation.
static CmpV.OpV[] VALUES
          Cached enums (faster).
 
Method Summary
abstract  boolean eval(Item a, Item b, Collation coll, InputInfo ii)
          Evaluates the expression.
abstract  CmpV.OpV invert()
          Inverts the comparator.
abstract  CmpV.OpV swap()
          Swaps the comparator.
 java.lang.String toString()
           
static CmpV.OpV valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static CmpV.OpV[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LE

public static final CmpV.OpV LE
Item comparison:less or equal.


LT

public static final CmpV.OpV LT
Item comparison:less.


GE

public static final CmpV.OpV GE
Item comparison:greater of equal.


GT

public static final CmpV.OpV GT
Item comparison:greater.


EQ

public static final CmpV.OpV EQ
Item comparison:equal.


NE

public static final CmpV.OpV NE
Item comparison:not equal.

Field Detail

VALUES

public static final CmpV.OpV[] VALUES
Cached enums (faster).


name

public final java.lang.String name
String representation.

Method Detail

values

public static CmpV.OpV[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (CmpV.OpV c : CmpV.OpV.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static CmpV.OpV valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

eval

public abstract boolean eval(Item a,
                             Item b,
                             Collation coll,
                             InputInfo ii)
                      throws QueryException
Evaluates the expression.

Parameters:
a - first item
b - second item
coll - query context
ii - input info
Returns:
result
Throws:
QueryException - query exception

swap

public abstract CmpV.OpV swap()
Swaps the comparator.

Returns:
swapped comparator

invert

public abstract CmpV.OpV invert()
Inverts the comparator.

Returns:
inverted comparator

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<CmpV.OpV>