Class CharPredicates
java.lang.Object
com.github.tommyettinger.ds.support.util.CharPredicates
Predefined CharPredicate tests that will work identically on all target platforms.
These are meant to replace
This is currently compatible with OpenJDK 25's Character methods.
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.
This is currently compatible with OpenJDK 25's Character methods.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.github.tommyettinger.function.CharPredicateStores the output ofCharacter.isAlphabetic(int)on OpenJDK 25, HotSpot.static final com.github.tommyettinger.function.CharPredicateStores the output ofCharacter.isDigit(char)on OpenJDK 25, HotSpot.static final com.github.tommyettinger.function.CharPredicateStores the output ofCharacter.isJavaIdentifierPart(char)on OpenJDK 25, HotSpot.static final com.github.tommyettinger.function.CharPredicateStores the output ofCharacter.isJavaIdentifierStart(char)on OpenJDK 25, HotSpot.static final com.github.tommyettinger.function.CharPredicateStores the output ofCharacter.isLetter(char)on OpenJDK 25, HotSpot.static final com.github.tommyettinger.function.CharPredicateStores the output ofCharacter.isWhitespace(char)on OpenJDK 25, HotSpot. -
Method Summary
-
Field Details
-
IS_LETTER
public static final com.github.tommyettinger.function.CharPredicate IS_LETTERStores the output ofCharacter.isLetter(char)on OpenJDK 25, HotSpot. -
IS_DIGIT
public static final com.github.tommyettinger.function.CharPredicate IS_DIGITStores the output ofCharacter.isDigit(char)on OpenJDK 25, HotSpot. -
IS_ALPHABETIC
public static final com.github.tommyettinger.function.CharPredicate IS_ALPHABETICStores the output ofCharacter.isAlphabetic(int)on OpenJDK 25, HotSpot. -
IS_WHITESPACE
public static final com.github.tommyettinger.function.CharPredicate IS_WHITESPACEStores the output ofCharacter.isWhitespace(char)on OpenJDK 25, HotSpot. -
IS_JAVA_IDENTIFIER_START
public static final com.github.tommyettinger.function.CharPredicate IS_JAVA_IDENTIFIER_STARTStores the output ofCharacter.isJavaIdentifierStart(char)on OpenJDK 25, HotSpot. -
IS_JAVA_IDENTIFIER_PART
public static final com.github.tommyettinger.function.CharPredicate IS_JAVA_IDENTIFIER_PARTStores the output ofCharacter.isJavaIdentifierPart(char)on OpenJDK 25, HotSpot.
-