public enum TestOperator extends Enum<TestOperator> implements MpxjEnum
| Enum Constant and Description |
|---|
AND |
CONTAINS |
CONTAINS_EXACTLY |
DOES_NOT_CONTAIN |
DOES_NOT_EQUAL |
EQUALS |
IS_ANY_VALUE |
IS_GREATER_THAN |
IS_GREATER_THAN_OR_EQUAL_TO |
IS_LESS_THAN |
IS_LESS_THAN_OR_EQUAL_TO |
IS_NOT_WITHIN |
IS_WITHIN |
OR |
| Modifier and Type | Method and Description |
|---|---|
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.
|
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
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 nameNullPointerException - if the argument is nullpublic static TestOperator getInstance(int type)
type - int typepublic static TestOperator getInstance(Number type)
type - int typepublic int getValue()
public abstract boolean evaluate(Object lhs, Object rhs)
lhs - operandrhs - operandprotected Object getSingleOperand(Object operand)
operand - operand valueprotected boolean evaluateWithin(Object lhs, Object rhs)
lhs - single value operandrhs - range operandprotected int evaluateCompareTo(Object lhs, Object rhs)
lhs - operandrhs - operandprotected boolean evaluateContains(Object lhs, Object rhs)
lhs - operandrhs - operandCopyright © 2000–2025 MPXJ. All rights reserved.