public static enum ConditionFactory.Op extends java.lang.Enum<ConditionFactory.Op>
ConditionFactory.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 |
|---|---|
private java.util.function.BiPredicate<java.lang.String,java.lang.String> |
function |
private boolean |
negated |
(package private) static java.util.Set<ConditionFactory.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 ConditionFactory.Op |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ConditionFactory.Op[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ConditionFactory.Op EQ
public static final ConditionFactory.Op NEQ
public static final ConditionFactory.Op GREATER_OR_EQUAL
public static final ConditionFactory.Op GREATER
public static final ConditionFactory.Op LESS_OR_EQUAL
public static final ConditionFactory.Op LESS
public static final ConditionFactory.Op REGEX
public static final ConditionFactory.Op NREGEX
public static final ConditionFactory.Op ONE_OF
public static final ConditionFactory.Op BEGINS_WITH
public static final ConditionFactory.Op ENDS_WITH
public static final ConditionFactory.Op CONTAINS
static final java.util.Set<ConditionFactory.Op> NEGATED_OPS
private final java.util.function.BiPredicate<java.lang.String,java.lang.String> function
private final boolean negated
public static ConditionFactory.Op[] values()
for (ConditionFactory.Op c : ConditionFactory.Op.values()) System.out.println(c);
public static ConditionFactory.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.