Enum CompareType

    • Enum Constant Detail

      • PLAIN

        public static final CompareType PLAIN
        Plain equals comparison.
      • ANT

        public static final CompareType ANT
        ANT style path comparison.
      • REG_EXP

        public static final CompareType REG_EXP
        Regular expression comparison.
    • Method Detail

      • values

        public static CompareType[] 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 (CompareType c : CompareType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static CompareType 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
      • getDisplayNames

        public static List<String> getDisplayNames()
        Gets a list of all CompareType's displayNames.
        Returns:
        a list of available displaynames.
      • findByDisplayName

        public static CompareType findByDisplayName​(String displayName)
        Finds a CompareType based on displayName.
        Parameters:
        displayName - the displayName
        Returns:
        the CompareType that matches the displayName or PLAIN if none is found.
      • findByOperator

        public static CompareType findByOperator​(char operator)
        Finds a CompareType based on the operator.
        Parameters:
        operator - the operator.
        Returns:
        the CompareType that matches the operator or PLAIN if none is found.
      • matches

        public boolean matches​(String pattern,
                               String str)
        Tells if the given string matches the given pattern based on the algorithm of this CompareType instance.
        Parameters:
        pattern - the pattern
        str - the string
        Returns:
        true if the string matches the pattern.
      • getDisplayName

        public String getDisplayName()
        Returns a "human readable" name of the instance.
        Returns:
        the display name
      • getOperator

        public char getOperator()
        Returns the operator, the one-char identifier for the CompareType.
        Returns:
        the operator.