Class CharPredicates

java.lang.Object
com.github.tommyettinger.ds.support.util.CharPredicates

public final class CharPredicates extends Object
Predefined CharPredicate tests that will work identically on all target platforms. These are meant to replace Character's static methods that test char properties, but may do so differently on different JRE versions (due to newer Unicode versions and their changes) or on GWT (where Unicode properties are essentially missing). This is not directly included elsewhere in this library to best allow dead code elimination.
  • Field Details

    • IS_LETTER

      public static final com.github.tommyettinger.function.CharPredicate IS_LETTER
      Stores the output of Character.isLetter(char) on OpenJDK 24, HotSpot.
    • IS_DIGIT

      public static final com.github.tommyettinger.function.CharPredicate IS_DIGIT
      Stores the output of Character.isDigit(char) on OpenJDK 24, HotSpot.
    • IS_ALPHABETIC

      public static final com.github.tommyettinger.function.CharPredicate IS_ALPHABETIC
      Stores the output of Character.isAlphabetic(int) on OpenJDK 24, HotSpot.
    • IS_WHITESPACE

      public static final com.github.tommyettinger.function.CharPredicate IS_WHITESPACE
      Stores the output of Character.isWhitespace(char) on OpenJDK 24, HotSpot.
    • IS_JAVA_IDENTIFIER_START

      public static final com.github.tommyettinger.function.CharPredicate IS_JAVA_IDENTIFIER_START
      Stores the output of Character.isJavaIdentifierStart(char) on OpenJDK 24, HotSpot.
    • IS_JAVA_IDENTIFIER_PART

      public static final com.github.tommyettinger.function.CharPredicate IS_JAVA_IDENTIFIER_PART
      Stores the output of Character.isJavaIdentifierPart(char) on OpenJDK 24, HotSpot.