Enum Class ConditionFactory.Op
- All Implemented Interfaces:
Serializable,Comparable<ConditionFactory.Op>,Constable
- Enclosing class:
- ConditionFactory
This is the operation that
ConditionFactory.KeyValueCondition uses to match.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe value needs to begin with the reference string.The value needs to contain the reference string.The value needs to end with the reference string.The value equals the given reference.The value is greater than the given reference value (as float).The value is greater than or equal to the given reference value (as float).The value is less than the given reference value (as float).The value is less than or equal to the given reference value (as float).The value does not equal the reference.The reference is treated as regular expression and the value needs to not match it.The reference is treated as a list separated by ';'.The reference is treated as regular expression and the value needs to match it. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BiPredicate<String,String> private final boolean(package private) static final Set<ConditionFactory.Op> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateOp(BiPredicate<String, String> func) Create a new string operation.privateOp(IntFunction<Boolean> comparatorResult) Create a new float operation that compares two float valuesprivateOp(ConditionFactory.Op negate) Create a new Op by negating an other op. -
Method Summary
Modifier and TypeMethodDescriptionbooleanEvaluates a value against a reference string.static ConditionFactory.OpReturns the enum constant of this class with the specified name.static ConditionFactory.Op[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQ
The value equals the given reference. -
NEQ
The value does not equal the reference. -
GREATER_OR_EQUAL
The value is greater than or equal to the given reference value (as float). -
GREATER
The value is greater than the given reference value (as float). -
LESS_OR_EQUAL
The value is less than or equal to the given reference value (as float). -
LESS
The value is less than the given reference value (as float). -
REGEX
The reference is treated as regular expression and the value needs to match it. -
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 ';'. Spaces around the ; are ignored. The value needs to be equal one of the list elements. -
BEGINS_WITH
The value needs to begin with the reference string. -
ENDS_WITH
The value needs to end with the reference string. -
CONTAINS
The value needs to contain the reference string.
-
-
Field Details
-
NEGATED_OPS
-
function
-
negated
-
-
Constructor Details
-
Op
Create a new string operation.- Parameters:
func- The function to apply duringeval(String, String).
-
Op
Create a new float operation that compares two float values- Parameters:
comparatorResult- A function to map the result of the comparison
-
Op
Create a new Op by negating an other op.- Parameters:
negate- inverse operation
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
eval
Evaluates a value against a reference string.- Parameters:
testString- The value. May benullprototypeString- The reference string-- Returns:
trueif and only if this operation matches for the given value/reference pair.
-