Enum Class LoadCheck.Comparator

java.lang.Object
java.lang.Enum<LoadCheck.Comparator>
org.mockserver.load.LoadCheck.Comparator
All Implemented Interfaces:
Serializable, Comparable<LoadCheck.Comparator>, Constable
Enclosing class:
LoadCheck

public static enum LoadCheck.Comparator extends Enum<LoadCheck.Comparator>
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.
  • Enum Constant Details

  • Method Details

    • values

      public static LoadCheck.Comparator[] 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

      public static LoadCheck.Comparator valueOf(String name)
      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 name
      NullPointerException - if the argument is null
    • matches

      public boolean matches(String observed, String expected)
      Returns:
      true when observed satisfies this comparator against expected. Numeric comparators return false when either operand is absent or not parseable as a double; MATCHES treats expected as a full-match regex (via Pattern.matches(java.lang.String, java.lang.CharSequence)).