public static enum Condition.Op extends java.lang.Enum<Condition.Op>
Condition.KeyValueCondition uses to match.| Enum Constant and Description |
|---|
BEGINS_WITH
The value needs to begin with the reference string.
|
CONTAINS
The value needs to contain the reference string.
|
ENDS_WITH
The value needs to end with the reference string.
|
EQ
The value equals the given reference.
|
GREATER
The value is greater than the given reference value (as float).
|
GREATER_OR_EQUAL
The value is greater than or equal to the given reference value (as float).
|
LESS
The value is less than the given reference value (as float).
|
LESS_OR_EQUAL
The value is less than or equal to the given reference value (as float).
|
NEQ
The value does not equal the reference.
|
NREGEX
The reference is treated as regular expression and the value needs to not match it.
|
ONE_OF
The reference is treated as a list separated by ';'.
|
REGEX
The reference is treated as regular expression and the value needs to match it.
|
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.Set<Condition.Op> |
NEGATED_OPS |
| Modifier and Type | Method and Description |
|---|---|
boolean |
eval(java.lang.String testString,
java.lang.String prototypeString)
Evaluates a value against a reference string.
|
static Condition.Op |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Condition.Op[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Condition.Op EQ
public static final Condition.Op NEQ
public static final Condition.Op GREATER_OR_EQUAL
public static final Condition.Op GREATER
public static final Condition.Op LESS_OR_EQUAL
public static final Condition.Op LESS
public static final Condition.Op REGEX
public static final Condition.Op NREGEX
public static final Condition.Op ONE_OF
public static final Condition.Op BEGINS_WITH
public static final Condition.Op ENDS_WITH
public static final Condition.Op CONTAINS
protected static final java.util.Set<Condition.Op> NEGATED_OPS
public static Condition.Op[] values()
for (Condition.Op c : Condition.Op.values()) System.out.println(c);
public static Condition.Op valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean eval(java.lang.String testString, java.lang.String prototypeString)
testString - The value. May be nullprototypeString - The reference string-true if and only if this operation matches for the given value/reference pair.