Top Description Fields Constructors Methods
org.jparsec.pattern

public final Class CharPredicates

extends Object
Class Inheritance
Imports
org.jparsec.internal.util.Strings

Provides common CharPredicate implementations.
Author
Ben Yu

Field Summary

Modifier and TypeField and Description
public static final CharPredicate
ALWAYS

A CharPredicate that always returns true.

public static final CharPredicate
IS_ALPHA

A CharPredicate that returns true if the character is an alpha character.

public static final CharPredicate
IS_ALPHA_

A CharPredicate that returns true if it is an alpha character or the underscore character _.

public static final CharPredicate
IS_ALPHA_NUMERIC

A CharPredicate that returns true if it is an alphanumeric character, or an underscore character.

public static final CharPredicate
IS_ALPHA_NUMERIC_

A CharPredicate that returns true if it is an alphanumeric character, or an underscore character.

public static final CharPredicate
IS_DIGIT

A CharPredicate that returns true if the character is a digit.

public static final 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].

public static final CharPredicate
IS_LETTER

A CharPredicate that returns true if Character#isLetter(char) returns true.

public static final CharPredicate
IS_LOWER_CASE

A CharPredicate that returns true if Character#isLowerCase(char) returns true.

public static final CharPredicate
IS_UPPER_CASE

A CharPredicate that returns true if Character#isUpperCase(char) returns true.

public static final CharPredicate
IS_WHITESPACE

A CharPredicate that returns true if Character#isWhitespace(char) returns true.

public static final CharPredicate
NEVER

A CharPredicate that always returns false.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CharPredicate
among(final String chars)

A CharPredicate that returns true if the character is equal to any character in chars.

public static CharPredicate
and(final CharPredicate predicate1, final CharPredicate predicate2)

A CharPredicate that returns true if both predicate1 and predicate2 evaluates to true.

public static CharPredicate
and(final CharPredicate... predicates)

A CharPredicate that returns true if all CharPredicate in predicates evaluate to true.

public static CharPredicate
isChar(final char c)

A CharPredicate that returns true if the character is equal to c.

public static CharPredicate
not(final CharPredicate predicate)

A CharPredicate that returns true if predicate evaluates to false.

public static CharPredicate
notAmong(final String chars)

A CharPredicate that returns true if the character is not equal to any character in chars.

public static CharPredicate
notChar(final char c)

A CharPredicate that returns true if the character is not equal to c.

public static CharPredicate
notRange(final char a, final char b)

A CharPredicate that returns true if the character is not within the range of [a, b].

public static CharPredicate
or(final CharPredicate predicate1, final CharPredicate predicate2)

A CharPredicate that returns true if either predicate1 or predicate2 evaluates to true.

public static CharPredicate
or(final CharPredicate... predicates)

A CharPredicate that returns true if any CharPredicate in predicates evaluates to true.

public static CharPredicate
range(final char a, final char b)

A CharPredicate that returns true if the character is within the range of [a, b].

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ALWAYSback to summary
public static final CharPredicate ALWAYS

A CharPredicate that always returns true.

IS_ALPHAback to summary
public static final CharPredicate IS_ALPHA

A CharPredicate that returns true if the character is an alpha character.

IS_ALPHA_back to summary
public static final CharPredicate IS_ALPHA_

A CharPredicate that returns true if it is an alpha character or the underscore character _.

IS_ALPHA_NUMERICback to summary
public static final CharPredicate IS_ALPHA_NUMERIC

A CharPredicate that returns true if it is an alphanumeric character, or an underscore character.

IS_ALPHA_NUMERIC_back to summary
public static final CharPredicate IS_ALPHA_NUMERIC_

A CharPredicate that returns true if it is an alphanumeric character, or an underscore character.

IS_DIGITback to summary
public static final CharPredicate IS_DIGIT

A CharPredicate that returns true if the character is a digit.

IS_HEX_DIGITback to summary
public static final 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].

IS_LETTERback to summary
public static final CharPredicate IS_LETTER

A CharPredicate that returns true if Character#isLetter(char) returns true.

IS_LOWER_CASEback to summary
public static final CharPredicate IS_LOWER_CASE

A CharPredicate that returns true if Character#isLowerCase(char) returns true.

IS_UPPER_CASEback to summary
public static final CharPredicate IS_UPPER_CASE

A CharPredicate that returns true if Character#isUpperCase(char) returns true.

IS_WHITESPACEback to summary
public static final CharPredicate IS_WHITESPACE

A CharPredicate that returns true if Character#isWhitespace(char) returns true.

NEVERback to summary
public static final CharPredicate NEVER

A CharPredicate that always returns false.

Constructor Detail

CharPredicatesback to summary
private CharPredicates()

Method Detail

amongback to summary
public static CharPredicate among(final String chars)

A CharPredicate that returns true if the character is equal to any character in chars.

andback to summary
public static CharPredicate and(final CharPredicate predicate1, final CharPredicate predicate2)

A CharPredicate that returns true if both predicate1 and predicate2 evaluates to true.

andback to summary
public static CharPredicate and(final CharPredicate... predicates)

A CharPredicate that returns true if all CharPredicate in predicates evaluate to true.

isCharback to summary
public static CharPredicate isChar(final char c)

A CharPredicate that returns true if the character is equal to c.

notback to summary
public static CharPredicate not(final CharPredicate predicate)

A CharPredicate that returns true if predicate evaluates to false.

notAmongback to summary
public static CharPredicate notAmong(final String chars)

A CharPredicate that returns true if the character is not equal to any character in chars.

notCharback to summary
public static CharPredicate notChar(final char c)

A CharPredicate that returns true if the character is not equal to c.

notRangeback to summary
public static CharPredicate notRange(final char a, final char b)

A CharPredicate that returns true if the character is not within the range of [a, b].

orback to summary
public static CharPredicate or(final CharPredicate predicate1, final CharPredicate predicate2)

A CharPredicate that returns true if either predicate1 or predicate2 evaluates to true.

orback to summary
public static CharPredicate or(final CharPredicate... predicates)

A CharPredicate that returns true if any CharPredicate in predicates evaluates to true.

rangeback to summary
public static CharPredicate range(final char a, final char b)

A CharPredicate that returns true if the character is within the range of [a, b].