Package org.mockserver.load
Enum Class LoadCheck.Comparator
- All Implemented Interfaces:
Serializable,Comparable<LoadCheck.Comparator>,Constable
- Enclosing class:
- LoadCheck
How the observed value is compared to the expected
LoadCheck.getValue(). String comparators
(EQUALS/NOT_EQUALS/CONTAINS/MATCHES) operate on the raw extracted
string; numeric comparators (GT/LT/GTE/LTE) parse both sides as
doubles and fail the check when either side is not a number.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic LoadCheck.ComparatorReturns the enum constant of this class with the specified name.static LoadCheck.Comparator[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EQUALS
-
NOT_EQUALS
-
CONTAINS
-
MATCHES
-
GT
-
LT
-
GTE
-
LTE
-
-
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
-
matches
- Returns:
- true when
observedsatisfies this comparator againstexpected. Numeric comparators return false when either operand is absent or not parseable as a double; MATCHES treatsexpectedas a full-match regex (viaPattern.matches(java.lang.String, java.lang.CharSequence)).
-