public static CharPredicate range(final char a, final char b) {
    return new CharPredicate() {
      @Override public boolean isChar(char c) {
        return c >= a && c <= b;
      }
      @Override public String toString() {
        return "[" + a + '-' + b + "]";
      }
    };
  }
public static CharPredicate range ( final char a , final char b ) { return new CharPredicate ( ) { @ Override public boolean isChar ( char c ) { return c >= a && c <= b ; } @ Override public String toString ( ) { return "[" + a + '-' + b + "]" ; } } ; }
A {@link CharPredicate} that returns true if the character is within the range of
{@code [a, b]}.