Enum Comparator

    • Enum Constant Detail

      • 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 Detail

      • values

        public static Comparator[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Comparator c : Comparator.values())
            System.out.println(c);
        
        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