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