Uses of Interface
org.jparsec.pattern.CharPredicate
-
Packages that use CharPredicate Package Description org.jparsec Provides core Parser implementations for parser combinator logic.org.jparsec.pattern Provides Pattern implementations for use by character level scanners. -
-
Uses of CharPredicate in org.jparsec
Fields in org.jparsec declared as CharPredicate Modifier and Type Field Description (package private) static CharPredicate
Indentation. INLINE_WHITESPACE
ACharPredicate
that returns true only if the character isn't line feed andCharacter.isWhitespace(char)
returns true.Methods in org.jparsec with parameters of type CharPredicate Modifier and Type Method Description static Parser<java.lang.Void>
Scanners. isChar(CharPredicate predicate)
A scanner that succeeds and consumes the current character if it satisfies the givenCharPredicate
.static Parser<java.lang.Void>
Scanners. isChar(CharPredicate predicate, java.lang.String name)
Deprecated.ImplementObject.toString()
in theCharPredicate
, or usePatterns.isChar(predicate).toScanner(name)
.static Parser<java.lang.Void>
Scanners. many(CharPredicate predicate)
A scanner that scans greedily for 0 or more characters that satisfies the given CharPredicate.static Parser<java.lang.Void>
Scanners. many1(CharPredicate predicate)
A scanner that scans greedily for 1 or more characters that satisfies the given CharPredicate. -
Uses of CharPredicate in org.jparsec.pattern
Fields in org.jparsec.pattern declared as CharPredicate Modifier and Type Field Description static CharPredicate
CharPredicates. ALWAYS
ACharPredicate
that always returns true.static CharPredicate
CharPredicates. IS_ALPHA
ACharPredicate
that returns true if the character is an alpha character.static CharPredicate
CharPredicates. IS_ALPHA_
ACharPredicate
that returns true if it is an alpha character or the underscore character_
.static CharPredicate
CharPredicates. IS_ALPHA_NUMERIC
ACharPredicate
that returns true if it is an alphanumeric character, or an underscore character.static CharPredicate
CharPredicates. IS_ALPHA_NUMERIC_
ACharPredicate
that returns true if it is an alphanumeric character, or an underscore character.static CharPredicate
CharPredicates. IS_DIGIT
ACharPredicate
that returns true if the character is a digit.static CharPredicate
CharPredicates. IS_HEX_DIGIT
ACharPredicate
that returns true if the character is a digit or within the range of[a-f]
or[A-F]
.static CharPredicate
CharPredicates. IS_LETTER
ACharPredicate
that returns true ifCharacter.isLetter(char)
returns true.static CharPredicate
CharPredicates. IS_LOWER_CASE
ACharPredicate
that returns true ifCharacter.isLowerCase(char)
returns true.static CharPredicate
CharPredicates. IS_UPPER_CASE
ACharPredicate
that returns true ifCharacter.isUpperCase(char)
returns true.static CharPredicate
CharPredicates. IS_WHITESPACE
ACharPredicate
that returns true ifCharacter.isWhitespace(char)
returns true.static CharPredicate
CharPredicates. NEVER
ACharPredicate
that always returns false.private CharPredicate
RepeatCharPredicatePattern. predicate
Methods in org.jparsec.pattern that return CharPredicate Modifier and Type Method Description static CharPredicate
CharPredicates. among(java.lang.String chars)
ACharPredicate
that returns true if the character is equal to any character inchars
.static CharPredicate
CharPredicates. and(CharPredicate... predicates)
static CharPredicate
CharPredicates. and(CharPredicate predicate1, CharPredicate predicate2)
static CharPredicate
CharPredicates. isChar(char c)
ACharPredicate
that returns true if the character is equal toc
.static CharPredicate
CharPredicates. not(CharPredicate predicate)
ACharPredicate
that returns true ifpredicate
evaluates to false.static CharPredicate
CharPredicates. notAmong(java.lang.String chars)
ACharPredicate
that returns true if the character is not equal to any character inchars
.static CharPredicate
CharPredicates. notChar(char c)
ACharPredicate
that returns true if the character is not equal toc
.static CharPredicate
CharPredicates. notRange(char a, char b)
ACharPredicate
that returns true if the character is not within the range of[a, b]
.static CharPredicate
CharPredicates. or(CharPredicate... predicates)
static CharPredicate
CharPredicates. or(CharPredicate predicate1, CharPredicate predicate2)
static CharPredicate
CharPredicates. range(char a, char b)
ACharPredicate
that returns true if the character is within the range of[a, b]
.Methods in org.jparsec.pattern with parameters of type CharPredicate Modifier and Type Method Description static CharPredicate
CharPredicates. and(CharPredicate... predicates)
static CharPredicate
CharPredicates. and(CharPredicate predicate1, CharPredicate predicate2)
static Pattern
Patterns. atLeast(int min, CharPredicate predicate)
Returns aPattern
object that matches if the input starts withmin
or more characters and all satisfypredicate
.static Pattern
Patterns. atMost(int max, CharPredicate predicate)
static Pattern
Patterns. isChar(CharPredicate predicate)
Returns aPattern
object that matches if the current character in the input satisfiespredicate
, in which case1
is returned as match length.static Pattern
Patterns. many(int min, CharPredicate predicate)
Deprecated.UsePatterns.atLeast(int, CharPredicate)
instead.static Pattern
Patterns. many(CharPredicate predicate)
Returns aPattern
that matches 0 or more characters satisfyingpredicate
.static Pattern
Patterns. many1(CharPredicate predicate)
Returns aPattern
that matches 1 or more characters satisfyingpredicate
.private static int
Patterns. matchMany(CharPredicate predicate, java.lang.CharSequence src, int len, int from, int acc)
(package private) static int
RepeatCharPredicatePattern. matchRepeat(int n, CharPredicate predicate, java.lang.CharSequence src, int length, int begin, int acc)
private static int
Patterns. matchSome(int max, CharPredicate predicate, java.lang.CharSequence src, int len, int from, int acc)
static CharPredicate
CharPredicates. not(CharPredicate predicate)
ACharPredicate
that returns true ifpredicate
evaluates to false.static CharPredicate
CharPredicates. or(CharPredicate... predicates)
static CharPredicate
CharPredicates. or(CharPredicate predicate1, CharPredicate predicate2)
static Pattern
Patterns. repeat(int n, CharPredicate predicate)
Returns aPattern
object that matches if the input has at leastn
characters and the firstn
characters all satisfypredicate
.static Pattern
Patterns. some(int min, int max, CharPredicate predicate)
Deprecated.UsePatterns.times(int, int, CharPredicate)
instead.static Pattern
Patterns. some(int max, CharPredicate predicate)
Deprecated.UsePatterns.atMost(int, CharPredicate)
instead.static Pattern
Patterns. times(int min, int max, CharPredicate predicate)
Returns aPattern
that matches at leastmin
and up tomax
number of characters satisfyingpredicate
,Constructors in org.jparsec.pattern with parameters of type CharPredicate Constructor Description RepeatCharPredicatePattern(int n, CharPredicate predicate)
-