public enum TestOperator extends Enum<TestOperator>
Enum Constant and Description |
---|
AND_ALL_CLEARED |
AND_ALL_SET |
EQUALS |
GREATER_THAN |
LESS_THAN |
NEGATE |
NOT_EQUALS |
Modifier and Type | Field and Description |
---|---|
static TestOperator |
DEFAULT_OPERATOR
Default operator which should be used if
fromTest(String) returns null; |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
doTest(boolean unsignedType,
Number extractedValue,
Number testValue,
NumberType numberType)
Perform the test using the operator.
|
static TestOperator |
fromTest(String testStr)
Returns the operator if the first character is an operator.
|
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 EQUALS
public static final TestOperator NOT_EQUALS
public static final TestOperator GREATER_THAN
public static final TestOperator LESS_THAN
public static final TestOperator AND_ALL_SET
public static final TestOperator AND_ALL_CLEARED
public static final TestOperator NEGATE
public static final TestOperator DEFAULT_OPERATOR
fromTest(String)
returns null;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 abstract boolean doTest(boolean unsignedType, Number extractedValue, Number testValue, NumberType numberType)
public static TestOperator fromTest(String testStr)
DEFAULT_OPERATOR
.
NOTE: We _don't_ return the default operator here because the caller needs to know if the prefix was supplied or not.
This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.