Package org.jparsec.pattern
Class CharPredicates
java.lang.Object
org.jparsec.pattern.CharPredicates
Provides common
CharPredicate implementations.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final CharPredicateACharPredicatethat always returns true.static final CharPredicateACharPredicatethat returns true if the character is an alpha character.static final CharPredicateACharPredicatethat returns true if it is an alpha character or the underscore character_.static final CharPredicateACharPredicatethat returns true if it is an alphanumeric character, or an underscore character.static final CharPredicateACharPredicatethat returns true if it is an alphanumeric character, or an underscore character.static final CharPredicateACharPredicatethat returns true if the character is a digit.static final CharPredicateACharPredicatethat returns true if the character is a digit or within the range of[a-f]or[A-F].static final CharPredicateACharPredicatethat returns true ifCharacter.isLetter(char)returns true.static final CharPredicateACharPredicatethat returns true ifCharacter.isLowerCase(char)returns true.static final CharPredicateACharPredicatethat returns true ifCharacter.isUpperCase(char)returns true.static final CharPredicateACharPredicatethat returns true ifCharacter.isWhitespace(char)returns true.static final CharPredicateACharPredicatethat always returns false. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CharPredicateACharPredicatethat returns true if the character is equal to any character inchars.static CharPredicateand(CharPredicate... predicates) static CharPredicateand(CharPredicate predicate1, CharPredicate predicate2) static CharPredicateisChar(char c) ACharPredicatethat returns true if the character is equal toc.static CharPredicatenot(CharPredicate predicate) ACharPredicatethat returns true ifpredicateevaluates to false.static CharPredicateACharPredicatethat returns true if the character is not equal to any character inchars.static CharPredicatenotChar(char c) ACharPredicatethat returns true if the character is not equal toc.static CharPredicatenotRange(char a, char b) ACharPredicatethat returns true if the character is not within the range of[a, b].static CharPredicateor(CharPredicate... predicates) static CharPredicateor(CharPredicate predicate1, CharPredicate predicate2) static CharPredicaterange(char a, char b) ACharPredicatethat returns true if the character is within the range of[a, b].
-
Field Details
-
NEVER
ACharPredicatethat always returns false. -
ALWAYS
ACharPredicatethat always returns true. -
IS_HEX_DIGIT
ACharPredicatethat returns true if the character is a digit or within the range of[a-f]or[A-F]. -
IS_UPPER_CASE
ACharPredicatethat returns true ifCharacter.isUpperCase(char)returns true. -
IS_LOWER_CASE
ACharPredicatethat returns true ifCharacter.isLowerCase(char)returns true. -
IS_WHITESPACE
ACharPredicatethat returns true ifCharacter.isWhitespace(char)returns true. -
IS_ALPHA
ACharPredicatethat returns true if the character is an alpha character. -
IS_ALPHA_
ACharPredicatethat returns true if it is an alpha character or the underscore character_. -
IS_LETTER
ACharPredicatethat returns true ifCharacter.isLetter(char)returns true. -
IS_ALPHA_NUMERIC
ACharPredicatethat returns true if it is an alphanumeric character, or an underscore character. -
IS_ALPHA_NUMERIC_
ACharPredicatethat returns true if it is an alphanumeric character, or an underscore character. -
IS_DIGIT
ACharPredicatethat returns true if the character is a digit.
-
-
Constructor Details
-
CharPredicates
private CharPredicates()
-
-
Method Details
-
isChar
ACharPredicatethat returns true if the character is equal toc. -
notChar
ACharPredicatethat returns true if the character is not equal toc. -
range
ACharPredicatethat returns true if the character is within the range of[a, b]. -
notRange
ACharPredicatethat returns true if the character is not within the range of[a, b]. -
among
ACharPredicatethat returns true if the character is equal to any character inchars. -
notAmong
ACharPredicatethat returns true if the character is not equal to any character inchars. -
not
ACharPredicatethat returns true ifpredicateevaluates to false. -
and
-
or
-
and
-
or
-