Package org.jparsec.pattern
Class CharPredicates
- java.lang.Object
-
- org.jparsec.pattern.CharPredicates
-
public final class CharPredicates extends java.lang.ObjectProvides commonCharPredicateimplementations.
-
-
Field Summary
Fields Modifier and Type Field Description static CharPredicateALWAYSACharPredicatethat always returns true.static CharPredicateIS_ALPHAACharPredicatethat returns true if the character is an alpha character.static CharPredicateIS_ALPHA_ACharPredicatethat returns true if it is an alpha character or the underscore character_.static CharPredicateIS_ALPHA_NUMERICACharPredicatethat returns true if it is an alphanumeric character, or an underscore character.static CharPredicateIS_ALPHA_NUMERIC_ACharPredicatethat returns true if it is an alphanumeric character, or an underscore character.static CharPredicateIS_DIGITACharPredicatethat returns true if the character is a digit.static CharPredicateIS_HEX_DIGITACharPredicatethat returns true if the character is a digit or within the range of[a-f]or[A-F].static CharPredicateIS_LETTERACharPredicatethat returns true ifCharacter.isLetter(char)returns true.static CharPredicateIS_LOWER_CASEACharPredicatethat returns true ifCharacter.isLowerCase(char)returns true.static CharPredicateIS_UPPER_CASEACharPredicatethat returns true ifCharacter.isUpperCase(char)returns true.static CharPredicateIS_WHITESPACEACharPredicatethat returns true ifCharacter.isWhitespace(char)returns true.static CharPredicateNEVERACharPredicatethat always returns false.
-
Constructor Summary
Constructors Modifier Constructor Description privateCharPredicates()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CharPredicateamong(java.lang.String chars)ACharPredicatethat 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 CharPredicatenotAmong(java.lang.String chars)ACharPredicatethat 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 Detail
-
NEVER
public static final CharPredicate NEVER
ACharPredicatethat always returns false.
-
ALWAYS
public static final CharPredicate ALWAYS
ACharPredicatethat always returns true.
-
IS_HEX_DIGIT
public static final CharPredicate 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
public static final CharPredicate IS_UPPER_CASE
ACharPredicatethat returns true ifCharacter.isUpperCase(char)returns true.
-
IS_LOWER_CASE
public static final CharPredicate IS_LOWER_CASE
ACharPredicatethat returns true ifCharacter.isLowerCase(char)returns true.
-
IS_WHITESPACE
public static final CharPredicate IS_WHITESPACE
ACharPredicatethat returns true ifCharacter.isWhitespace(char)returns true.
-
IS_ALPHA
public static final CharPredicate IS_ALPHA
ACharPredicatethat returns true if the character is an alpha character.
-
IS_ALPHA_
public static final CharPredicate IS_ALPHA_
ACharPredicatethat returns true if it is an alpha character or the underscore character_.
-
IS_LETTER
public static final CharPredicate IS_LETTER
ACharPredicatethat returns true ifCharacter.isLetter(char)returns true.
-
IS_ALPHA_NUMERIC
public static final CharPredicate IS_ALPHA_NUMERIC
ACharPredicatethat returns true if it is an alphanumeric character, or an underscore character.
-
IS_ALPHA_NUMERIC_
public static final CharPredicate IS_ALPHA_NUMERIC_
ACharPredicatethat returns true if it is an alphanumeric character, or an underscore character.
-
IS_DIGIT
public static final CharPredicate IS_DIGIT
ACharPredicatethat returns true if the character is a digit.
-
-
Method Detail
-
isChar
public static CharPredicate isChar(char c)
ACharPredicatethat returns true if the character is equal toc.
-
notChar
public static CharPredicate notChar(char c)
ACharPredicatethat returns true if the character is not equal toc.
-
range
public static CharPredicate range(char a, char b)
ACharPredicatethat returns true if the character is within the range of[a, b].
-
notRange
public static CharPredicate notRange(char a, char b)
ACharPredicatethat returns true if the character is not within the range of[a, b].
-
among
public static CharPredicate among(java.lang.String chars)
ACharPredicatethat returns true if the character is equal to any character inchars.
-
notAmong
public static CharPredicate notAmong(java.lang.String chars)
ACharPredicatethat returns true if the character is not equal to any character inchars.
-
not
public static CharPredicate not(CharPredicate predicate)
ACharPredicatethat returns true ifpredicateevaluates to false.
-
and
public static CharPredicate and(CharPredicate predicate1, CharPredicate predicate2)
-
or
public static CharPredicate or(CharPredicate predicate1, CharPredicate predicate2)
-
and
public static CharPredicate and(CharPredicate... predicates)
-
or
public static CharPredicate or(CharPredicate... predicates)
-
-