public final class CharPredicates extends Object
CharPredicate
implementations.Modifier and Type | Field and Description |
---|---|
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. |
Modifier and Type | Method and Description |
---|---|
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)
|
static CharPredicate |
and(CharPredicate predicate1,
CharPredicate predicate2)
|
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)
|
static CharPredicate |
or(CharPredicate predicate1,
CharPredicate predicate2)
|
static CharPredicate |
range(char a,
char b)
A
CharPredicate that returns true if the character is within the range of
[a, b] . |
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.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)
public static CharPredicate or(CharPredicate predicate1, CharPredicate predicate2)
public static CharPredicate and(CharPredicate... predicates)
public static CharPredicate or(CharPredicate... predicates)
Copyright © 2013–2016 jparsec. All rights reserved.