|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.jparsec.pattern.CharPredicates
public final class CharPredicates
Provides common CharPredicate
implementations.
Field Summary | |
---|---|
static CharPredicate |
ALWAYS
A CharPredicate that always returns true. |
static CharPredicate |
IS_ALPHA
A CharPredicate that returns true if the character is an alpha character. |
static CharPredicate |
IS_ALPHA_
A CharPredicate that returns true if it is an alpha character or the underscore
character _ . |
static CharPredicate |
IS_ALPHA_NUMERIC
A CharPredicate that returns true if it is an alphanumeric character, or an
underscore character. |
static CharPredicate |
IS_ALPHA_NUMERIC_
A CharPredicate that returns true if it is an alphanumeric character, or an
underscore character. |
static CharPredicate |
IS_DIGIT
A CharPredicate that returns true if the character is a digit. |
static CharPredicate |
IS_HEX_DIGIT
A CharPredicate that returns true if the character is a digit or within the range
of [a-f] or [A-F] . |
static CharPredicate |
IS_LETTER
A CharPredicate that returns true if Character.isLetter(char) returns
true. |
static CharPredicate |
IS_LOWER_CASE
A CharPredicate that returns true if Character.isLowerCase(char) returns
true. |
static CharPredicate |
IS_UPPER_CASE
A CharPredicate that returns true if Character.isUpperCase(char) returns
true. |
static CharPredicate |
IS_WHITESPACE
A CharPredicate that returns true if Character.isWhitespace(char)
returns true. |
static CharPredicate |
NEVER
A CharPredicate that always returns false. |
Method Summary | |
---|---|
static CharPredicate |
among(String chars)
A CharPredicate that returns true if the character is equal to any character in
chars . |
static CharPredicate |
and(CharPredicate... predicates)
A CharPredicate that returns true if all CharPredicate in
predicates evaluate to true. |
static CharPredicate |
and(CharPredicate predicate1,
CharPredicate predicate2)
A CharPredicate that returns true if both predicate1 and
predicate2 evaluates to true. |
static CharPredicate |
isChar(char c)
A CharPredicate that returns true if the character is equal to c . |
static CharPredicate |
not(CharPredicate predicate)
A CharPredicate that returns true if predicate evaluates to false. |
static CharPredicate |
notAmong(String chars)
A CharPredicate that returns true if the character is not equal to any character
in chars . |
static CharPredicate |
notChar(char c)
A CharPredicate that returns true if the character is not equal to c . |
static CharPredicate |
notRange(char a,
char b)
A CharPredicate that returns true if the character is not within the range of
[a, b] . |
static CharPredicate |
or(CharPredicate... predicates)
A CharPredicate that returns true if any CharPredicate in
predicates evaluates to true. |
static CharPredicate |
or(CharPredicate predicate1,
CharPredicate predicate2)
A CharPredicate that returns true if either predicate1 or
predicate2 evaluates to true. |
static CharPredicate |
range(char a,
char b)
A CharPredicate that returns true if the character is within the range of
[a, b] . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final CharPredicate NEVER
CharPredicate
that always returns false.
public static final CharPredicate ALWAYS
CharPredicate
that always returns true.
public static final CharPredicate IS_HEX_DIGIT
CharPredicate
that returns true if the character is a digit or within the range
of [a-f]
or [A-F]
.
public static final CharPredicate IS_UPPER_CASE
CharPredicate
that returns true if Character.isUpperCase(char)
returns
true.
public static final CharPredicate IS_LOWER_CASE
CharPredicate
that returns true if Character.isLowerCase(char)
returns
true.
public static final CharPredicate IS_WHITESPACE
CharPredicate
that returns true if Character.isWhitespace(char)
returns true.
public static final CharPredicate IS_ALPHA
CharPredicate
that returns true if the character is an alpha character.
public static final CharPredicate IS_ALPHA_
CharPredicate
that returns true if it is an alpha character or the underscore
character _
.
public static final CharPredicate IS_LETTER
CharPredicate
that returns true if Character.isLetter(char)
returns
true.
public static final CharPredicate IS_ALPHA_NUMERIC
CharPredicate
that returns true if it is an alphanumeric character, or an
underscore character.
public static final CharPredicate IS_ALPHA_NUMERIC_
CharPredicate
that returns true if it is an alphanumeric character, or an
underscore character.
public static final CharPredicate IS_DIGIT
CharPredicate
that returns true if the character is a digit.
Method Detail |
---|
public static CharPredicate isChar(char c)
CharPredicate
that returns true if the character is equal to c
.
public static CharPredicate notChar(char c)
CharPredicate
that returns true if the character is not equal to c
.
public static CharPredicate range(char a, char b)
CharPredicate
that returns true if the character is within the range of
[a, b]
.
public static CharPredicate notRange(char a, char b)
CharPredicate
that returns true if the character is not within the range of
[a, b]
.
public static CharPredicate among(String chars)
CharPredicate
that returns true if the character is equal to any character in
chars
.
public static CharPredicate notAmong(String chars)
CharPredicate
that returns true if the character is not equal to any character
in chars
.
public static CharPredicate not(CharPredicate predicate)
CharPredicate
that returns true if predicate
evaluates to false.
public static CharPredicate and(CharPredicate predicate1, CharPredicate predicate2)
CharPredicate
that returns true if both predicate1
and
predicate2
evaluates to true.
public static CharPredicate or(CharPredicate predicate1, CharPredicate predicate2)
CharPredicate
that returns true if either predicate1
or
predicate2
evaluates to true.
public static CharPredicate and(CharPredicate... predicates)
CharPredicate
that returns true if all CharPredicate
in
predicates
evaluate to true.
public static CharPredicate or(CharPredicate... predicates)
CharPredicate
that returns true if any CharPredicate
in
predicates
evaluates to true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |