Enum Class ComparisonOperator
- All Implemented Interfaces:
Serializable
,Comparable<ComparisonOperator>
,Constable
An enum listing the possible comparison operations. Some only apply to numbers, others to strings, dates, etc.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
evaluate
(SimplePatternSearcher searcher, String pattern, String input) boolean
Compares two number according to the operator.boolean
static ComparisonOperator
fromString
(String value) Similar to valueOf, but also matches display name value (symbols, like "=")Returns the short display value of the enum's value eg.toString()
static ComparisonOperator
Returns the enum constant of this class with the specified name.static ComparisonOperator[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GreaterThan
-
GreaterThanEqual
-
LessThan
-
LessThanEqual
-
Equal
-
NotEqual
-
Like
-
NotLike
-
-
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
-
fromString
Similar to valueOf, but also matches display name value (symbols, like "=") -
getDisplayValue
Returns the short display value of the enum's value eg. <, =, etc. -
toString
- Overrides:
toString
in classEnum<ComparisonOperator>
-
evaluate
Compares two number according to the operator. Note: The numbers will be converted to double for comparison, so if that is not appropriate, a different comparison mechanism should be used. -
evaluate
-
evaluate
-
canEvaluateStrings
public boolean canEvaluateStrings()
-