Interface StringMatcher

    • Field Detail

      • NotNull

        static final StringMatcher NotNull
        Matches CharSequences that are not null.
      • HasPunctuation

        static final StringMatcher HasPunctuation
        Matches CharSequences containing punctuation.
      • HasUpperCase

        static final StringMatcher HasUpperCase
        Matches CharSequences containing upper case
      • HasLowerCase

        static final StringMatcher HasLowerCase
        Matches CharSequences containing lower case
      • HasLetter

        static final StringMatcher HasLetter
        Matches CharSequences containing letters
      • HasDigit

        static final StringMatcher HasDigit
        Matches CharSequences containing digits
      • HasLetterOrDigit

        static final StringMatcher HasLetterOrDigit
        Matches CharSequences containing letter or digits
      • LetterOrWhitespace

        static final StringMatcher LetterOrWhitespace
        Matches CharSequences containing all letter or whitespace
      • Null

        static final StringMatcher Null
        Matches CharSequences are null
      • NullOrBlank

        static final StringMatcher NullOrBlank
        Matches CharSequences that are null or blank
      • NotNullOrBlank

        static final StringMatcher NotNullOrBlank
        Matches CharSequences that are not null or blank
      • LowerCase

        static final StringMatcher LowerCase
        Matches CharSequences that are only lower case
      • Letter

        static final StringMatcher Letter
        Matches CharSequences that are only letters
      • LetterOrDigit

        static final StringMatcher LetterOrDigit
        Matches CharSequences that are only letter or digits
      • Digit

        static final StringMatcher Digit
        Matches digit only CharSequences
      • Punctuation

        static final StringMatcher Punctuation
        Matches punctuation only CharSequences
      • UpperCase

        static final StringMatcher UpperCase
        Matches upper case only CharSequences
    • Method Detail

      • contains

        static StringMatcher contains​(String match)
        String matcher that evaluates true if the CharSequence contains the given string to match.
        Parameters:
        match - the string to match
        Returns:
        the string matcher
      • contains

        static StringMatcher contains​(String match,
                                      boolean caseSensitive)
        String matcher that evaluates true if the CharSequence contains the given string to match.
        Parameters:
        match - the string to match
        caseSensitive - True case sensitive match, False case insensitive match.
        Returns:
        the string matcher
      • endsWith

        static StringMatcher endsWith​(String match)
        String matcher that evaluates true if the CharSequence ends with the given string to match.
        Parameters:
        match - the string to match
        Returns:
        the string matcher
      • endsWith

        static StringMatcher endsWith​(String match,
                                      boolean caseSensitive)
        String matcher that evaluates true if the CharSequence ends with the given string to match.
        Parameters:
        match - the string to match
        caseSensitive - True case sensitive match, False case insensitive match.
        Returns:
        the string matcher
      • matches

        static StringMatcher matches​(String match)
        String matcher that evaluates true if the CharSequence matches the given string to match.
        Parameters:
        match - the string to match
        Returns:
        the string matcher
      • matches

        static StringMatcher matches​(String match,
                                     boolean caseSensitive)
        String matcher that evaluates true if the CharSequence matches the given string to match.
        Parameters:
        match - the string to match
        caseSensitive - True case sensitive match, False case insensitive match.
        Returns:
        the string matcher
      • regex

        static StringMatcher regex​(Pattern pattern)
        String matcher that evaluates true if the CharSequence is matched using the given regex.
        Parameters:
        pattern - the pattern to match
        Returns:
        the string matcher
      • regex

        static StringMatcher regex​(String pattern)
        String matcher that evaluates true if the CharSequence is matched using the given regex.
        Parameters:
        pattern - the pattern to match
        Returns:
        the string matcher
      • startsWith

        static StringMatcher startsWith​(String match)
        String matcher that evaluates true if the CharSequence starts with the given string to match.
        Parameters:
        match - the string to match
        Returns:
        the string matcher
      • startsWith

        static StringMatcher startsWith​(String match,
                                        boolean caseSensitive)
        String matcher that evaluates true if the CharSequence starts with the given string to match.
        Parameters:
        match - the string to match
        caseSensitive - True case sensitive match, False case insensitive match.
        Returns:
        the string matcher