public enum StringOperator extends Enum<StringOperator>
Enum Constant and Description |
---|
EQUALS |
GREATER_THAN |
LESS_THAN |
NOT_EQUALS |
Modifier and Type | Field and Description |
---|---|
static StringOperator |
DEFAULT_OPERATOR
Default operator which should be used if
fromTest(String) returns null; |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
doTest(char extractedChar,
char testChar,
boolean lastChar)
Test 2 characters.
|
static StringOperator |
fromTest(String testStr)
Returns the operator if the first character is an operator.
|
static StringOperator |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StringOperator[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StringOperator EQUALS
public static final StringOperator NOT_EQUALS
public static final StringOperator GREATER_THAN
public static final StringOperator LESS_THAN
public static final StringOperator DEFAULT_OPERATOR
fromTest(String)
returns null;public static StringOperator[] values()
for (StringOperator c : StringOperator.values()) System.out.println(c);
public static StringOperator 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(char extractedChar, char testChar, boolean lastChar)
public static StringOperator 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.