code: public static CharMatcher forPredicate(final Predicate<? super Character> predicate) {
      checkNotNull(predicate);
      if (predicate instanceof CharMatcher) {
        return (CharMatcher) predicate;
      }
      return new CharMatcher() {
        @Override public boolean matches(char c) {
          return predicate.apply(c);
        }
  
        @Override public boolean apply(Character character) {
          return predicate.apply(checkNotNull(character));
        }
  
        @Override public String toString() {
          return "CharMatcher.forPredicate(" + predicate + ")";
        }
      };
    }
docs: Returns a matcher with identical behavior to the given {@link Character}-based predicate, but
  which operates on primitive {@code char} instances instead.
  
  @param predicate the predicate
  @return the char matcher