java.lang.Object
java.lang.Enum<Comparator>
org.jenkinsci.plugins.pipeline.modeldefinition.when.utils.Comparator
All Implemented Interfaces:
Serializable, Comparable<Comparator>

public enum Comparator extends Enum<Comparator>
Utility for selecting a way to compare two strings.
  • Enum Constant Details

    • GLOB

      public static final Comparator GLOB
      ANT style "glob" pattern.
    • REGEXP

      public static final Comparator REGEXP
      Regular expression
    • EQUALS

      public static final Comparator EQUALS
      String equals
  • Method Details

    • values

      public static Comparator[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Comparator valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • getDisplayName

      public org.jvnet.localizer.Localizable getDisplayName()
    • compare

      public abstract boolean compare(String pattern, String actual, boolean caseSensitive)
      Compare the two strings
      Parameters:
      pattern - the pattern/value to check for
      actual - the value to check
      caseSensitive - whether the comparison will be case-sensitive. Only for the GLOB comparator
      Returns:
      true if matching
    • compare

      public abstract boolean compare(String pattern, String actual)
      Compare the two strings
      Parameters:
      pattern - the pattern/value to check for
      actual - the value to check
      Returns:
      true if matching
    • get

      public static Comparator get(String name, Comparator defaultValue)
    • getSelectOptions

      public static ListBoxModel getSelectOptions(boolean emptySelection, Comparator top)