Class CharMatcher.Negated

    • Method Detail

      • matches

        public boolean matches​(char c)
        Description copied from class: CharMatcher
        Determines a true or false value for the given character.
        Specified by:
        matches in class CharMatcher
      • matchesAllOf

        public boolean matchesAllOf​(java.lang.CharSequence sequence)
        Description copied from class: CharMatcher
        Returns true if a character sequence contains only matching characters.

        The default implementation iterates over the sequence, invoking CharMatcher.matches(char) for each character, until this returns false or the end is reached.

        Overrides:
        matchesAllOf in class CharMatcher
        Parameters:
        sequence - the character sequence to examine, possibly empty
        Returns:
        true if this matcher matches every character in the sequence, including when the sequence is empty
      • matchesNoneOf

        public boolean matchesNoneOf​(java.lang.CharSequence sequence)
        Description copied from class: CharMatcher
        Returns true if a character sequence contains no matching characters. Equivalent to !matchesAnyOf(sequence).

        The default implementation iterates over the sequence, invoking CharMatcher.matches(char) for each character, until this returns true or the end is reached.

        Overrides:
        matchesNoneOf in class CharMatcher
        Parameters:
        sequence - the character sequence to examine, possibly empty
        Returns:
        true if this matcher matches no characters in the sequence, including when the sequence is empty
      • countIn

        public int countIn​(java.lang.CharSequence sequence)
        Description copied from class: CharMatcher
        Returns the number of matching characters found in a character sequence.
        Overrides:
        countIn in class CharMatcher
      • negate

        public CharMatcher negate()
        Description copied from class: CharMatcher
        Returns a matcher that matches any character not matched by this matcher.
        Overrides:
        negate in class CharMatcher
      • toString

        public java.lang.String toString()
        Description copied from class: CharMatcher
        Returns a string representation of this CharMatcher, such as CharMatcher.or(WHITESPACE, JAVA_DIGIT).
        Overrides:
        toString in class CharMatcher