|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<TestOperator>
net.sf.mpxj.TestOperator
public enum TestOperator
This class represents the set of operators used to perform a test between two or more operands.
| Method Summary | |
|---|---|
abstract boolean |
evaluate(Object lhs,
Object rhs)
This method applies the operator represented by this class to the supplied operands. |
protected int |
evaluateCompareTo(Object lhs,
Object rhs)
Implements a simple compare-to operation. |
protected boolean |
evaluateContains(Object lhs,
Object rhs)
Assuming the supplied arguments are both Strings, this method determines if rhs is contained within lhs. |
protected boolean |
evaluateContainsExactly(Object lhs,
Object rhs)
Assuming the supplied arguments are both Strings, this method determines if rhs is contained within lhs. |
protected boolean |
evaluateWithin(Object lhs,
Object rhs)
Determine if the supplied value falls within the specified range. |
static TestOperator |
getInstance(int type)
Retrieve an instance of the enum based on its int value. |
static TestOperator |
getInstance(Number type)
Retrieve an instance of the enum based on its int value. |
protected Object |
getSingleOperand(Object operand)
This method is used to ensure that if a list of operand values has been supplied, that a single operand is extracted. |
int |
getValue()
Accessor method used to retrieve the numeric representation of the enum. |
static TestOperator |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static TestOperator[] |
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, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final TestOperator IS_ANY_VALUE
public static final TestOperator IS_WITHIN
public static final TestOperator IS_GREATER_THAN
public static final TestOperator IS_LESS_THAN
public static final TestOperator IS_GREATER_THAN_OR_EQUAL_TO
public static final TestOperator IS_LESS_THAN_OR_EQUAL_TO
public static final TestOperator EQUALS
public static final TestOperator DOES_NOT_EQUAL
public static final TestOperator CONTAINS
public static final TestOperator IS_NOT_WITHIN
public static final TestOperator DOES_NOT_CONTAIN
public static final TestOperator CONTAINS_EXACTLY
public static final TestOperator AND
public static final TestOperator OR
| Method Detail |
|---|
public static TestOperator[] values()
for (TestOperator c : TestOperator.values()) System.out.println(c);
public static TestOperator valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic static TestOperator getInstance(int type)
type - int type
public static TestOperator getInstance(Number type)
type - int type
public int getValue()
getValue in interface MpxjEnum
public abstract boolean evaluate(Object lhs,
Object rhs)
lhs - operandrhs - operand
protected Object getSingleOperand(Object operand)
operand - operand value
protected boolean evaluateWithin(Object lhs,
Object rhs)
lhs - single value operandrhs - range operand
protected int evaluateCompareTo(Object lhs,
Object rhs)
lhs - operandrhs - operand
protected boolean evaluateContains(Object lhs,
Object rhs)
lhs - operandrhs - operand
protected boolean evaluateContainsExactly(Object lhs,
Object rhs)
lhs - operandrhs - operand
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||