Enum StringMatcher.Mode

    • Enum Constant Detail

      • EQUALS_FULLY

        public static final StringMatcher.Mode EQUALS_FULLY
        Checks if two strings equal and respects casing differences.
      • EQUALS_FULLY_IGNORE_CASE

        public static final StringMatcher.Mode EQUALS_FULLY_IGNORE_CASE
        Checks if two strings equal without respecting casing differences.
      • STARTS_WITH

        public static final StringMatcher.Mode STARTS_WITH
        Checks if a string starts with the a second string with respecting casing differences.
      • STARTS_WITH_IGNORE_CASE

        public static final StringMatcher.Mode STARTS_WITH_IGNORE_CASE
        Checks if a string starts with a second string without respecting casing differences.
      • ENDS_WITH

        public static final StringMatcher.Mode ENDS_WITH
        Checks if a string ends with a second string with respecting casing differences.
      • ENDS_WITH_IGNORE_CASE

        public static final StringMatcher.Mode ENDS_WITH_IGNORE_CASE
        Checks if a string ends with a second string without respecting casing differences.
      • CONTAINS

        public static final StringMatcher.Mode CONTAINS
        Checks if a string contains another string with respecting casing differences.
      • CONTAINS_IGNORE_CASE

        public static final StringMatcher.Mode CONTAINS_IGNORE_CASE
        Checks if a string contains another string without respecting casing differences.
      • MATCHES

        public static final StringMatcher.Mode MATCHES
        Checks if a string can be matched by a regular expression.
    • Method Detail

      • values

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

        public static StringMatcher.Mode 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
      • getDescription

        protected String getDescription()
        Returns the description of this match mode.
        Returns:
        The description of this match mode.
      • matches

        protected abstract boolean matches​(String expected,
                                           String actual)
        Matches a string against another string.
        Parameters:
        expected - The target of the comparison against which the actual string is compared.
        actual - The source which is subject of the comparison to the expected value.
        Returns:
        true if the source matches the target.