Uses of Interface
org.jparsec.pattern.CharPredicate
Packages that use CharPredicate
Package
Description
Provides core Parser implementations for parser combinator logic.
Provides Pattern implementations for use by character level scanners.
-
Uses of CharPredicate in org.jparsec
Fields in org.jparsec declared as CharPredicateModifier and TypeFieldDescription(package private) static final 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 CharPredicateModifier and TypeMethodDescriptionScanners.isChar
(CharPredicate predicate) A scanner that succeeds and consumes the current character if it satisfies the givenCharPredicate
.Scanners.isChar
(CharPredicate predicate, String name) Deprecated.Scanners.many
(CharPredicate predicate) A scanner that scans greedily for 0 or more characters that satisfies the given CharPredicate.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 CharPredicateModifier and TypeFieldDescriptionstatic final CharPredicate
CharPredicates.ALWAYS
ACharPredicate
that always returns true.static final CharPredicate
CharPredicates.IS_ALPHA
ACharPredicate
that returns true if the character is an alpha character.static final CharPredicate
CharPredicates.IS_ALPHA_
ACharPredicate
that returns true if it is an alpha character or the underscore character_
.static final CharPredicate
CharPredicates.IS_ALPHA_NUMERIC
ACharPredicate
that returns true if it is an alphanumeric character, or an underscore character.static final CharPredicate
CharPredicates.IS_ALPHA_NUMERIC_
ACharPredicate
that returns true if it is an alphanumeric character, or an underscore character.static final CharPredicate
CharPredicates.IS_DIGIT
ACharPredicate
that returns true if the character is a digit.static final 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 final CharPredicate
CharPredicates.IS_LETTER
ACharPredicate
that returns true ifCharacter.isLetter(char)
returns true.static final CharPredicate
CharPredicates.IS_LOWER_CASE
ACharPredicate
that returns true ifCharacter.isLowerCase(char)
returns true.static final CharPredicate
CharPredicates.IS_UPPER_CASE
ACharPredicate
that returns true ifCharacter.isUpperCase(char)
returns true.static final CharPredicate
CharPredicates.IS_WHITESPACE
ACharPredicate
that returns true ifCharacter.isWhitespace(char)
returns true.static final CharPredicate
CharPredicates.NEVER
ACharPredicate
that always returns false.private final CharPredicate
RepeatCharPredicatePattern.predicate
Methods in org.jparsec.pattern that return CharPredicateModifier and TypeMethodDescriptionstatic CharPredicate
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
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 CharPredicateModifier and TypeMethodDescriptionstatic 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, CharSequence src, int len, int from, int acc) (package private) static int
RepeatCharPredicatePattern.matchRepeat
(int n, CharPredicate predicate, CharSequence src, int length, int begin, int acc) private static int
Patterns.matchSome
(int max, CharPredicate predicate, 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 CharPredicateModifierConstructorDescription(package private)
RepeatCharPredicatePattern
(int n, CharPredicate predicate)
Object.toString()
in theCharPredicate
, or usePatterns.isChar(predicate).toScanner(name)
.