Class CharMatcher.ForPredicate

    • Field Detail

      • predicate

        private final Predicate<? super java.lang.Character> predicate
    • Constructor Detail

      • ForPredicate

        ForPredicate​(Predicate<? super java.lang.Character> predicate)
    • 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
      • apply

        public boolean apply​(java.lang.Character character)
        Description copied from interface: Predicate
        Returns the result of applying this predicate to input (Java 8 users, see notes in the class documentation above). This method is generally expected, but not absolutely required, to have the following properties:
        • Its execution does not cause any observable side effects.
        • The computation is consistent with equals; that is, Objects.equal(a, b) implies that predicate.apply(a) == predicate.apply(b)).
        Specified by:
        apply in interface Predicate<java.lang.Character>
        Overrides:
        apply 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