Interface CharacterPredicate

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface CharacterPredicate
Represents a predicate (boolean-valued function) of one character argument. This is a functional interface whose functional method is test(char).

Note that Predicate could be used instead, but it would introduce unnecessary autoboxing for char arguments.

Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    test(char c)
    Evaluates this predicate on the given character.
  • Method Details

    • test

      boolean test(char c)
      Evaluates this predicate on the given character.
      Parameters:
      c - the input character
      Returns:
      true if the input character matches the predicate, otherwise false