Uses of Interface
com.google.mu.util.CharPredicate
Packages that use CharPredicate
-
Uses of CharPredicate in com.google.mu.util
Fields in com.google.mu.util declared as CharPredicateModifier and TypeFieldDescriptionstatic final CharPredicate
CharPredicate.ALPHA
Equivalent to the[a-zA-Z]
character class.static final CharPredicate
CharPredicate.ANY
Corresponds to all characters.static final CharPredicate
CharPredicate.ASCII
Corresponds to the ASCII characters.static final CharPredicate
CharPredicate.NONE
Corresponds to no characters.static final CharPredicate
CharPredicate.WORD
Equivalent to the[a-zA-Z0-9_]
character class.Methods in com.google.mu.util that return CharPredicateModifier and TypeMethodDescriptiondefault CharPredicate
CharPredicate.and
(CharPredicate that) Returns aCharPredicate
that evaluates true if both this andthat
predicate evaluate to true.static CharPredicate
Returns a CharPredicate that matches any ofchars
.static CharPredicate
CharPredicate.is
(char ch) Returns a CharPredicate for the range of characters:[from, to]
.static CharPredicate
Returns a CharPredicate that matches any ofchars
.default CharPredicate
CharPredicate.not()
Returns the negation of thisCharPredicate
.default CharPredicate
CharPredicate.or
(char ch) Returns aCharPredicate
that evaluates true if either this predicate evaluates to true, or the character isch
.default CharPredicate
CharPredicate.or
(CharPredicate that) Returns aCharPredicate
that evaluates true if either this orthat
predicate evaluate to true.default CharPredicate
CharPredicate.orRange
(char from, char to) Returns aCharPredicate
that evaluates true if either this predicate evaluates to true, or the character is in the range of[from, to]
.static CharPredicate
CharPredicate.range
(char from, char to) Returns a CharPredicate for the range of characters:[from, to]
.Methods in com.google.mu.util with parameters of type CharPredicateModifier and TypeMethodDescriptionstatic Substring.RepeatingPattern
Substring.all
(CharPredicate matcher) Returns aSubstring.RepeatingPattern
that matches all characters that matchmatcher
in the input string.default CharPredicate
CharPredicate.and
(CharPredicate that) Returns aCharPredicate
that evaluates true if both this andthat
predicate evaluate to true.static Substring.Pattern
Substring.consecutive
(CharPredicate matcher) Returns aPattern
that matches the first non-empty sequence of consecutive characters identified bymatcher
.static Substring.Pattern
Substring.first
(CharPredicate charMatcher) Returns aPattern
that matches the first character found bycharMatcher
.boolean
Substring.Match.isFollowedBy
(CharPredicate lookahead) Returns true if the match is immediately followed by a character that matches thelookahead
predicate.boolean
Substring.Match.isPrecededBy
(CharPredicate lookbehind) Returns true if the match immediately follows a character that matches thelookbehind
predicate.static Substring.Pattern
Substring.last
(CharPredicate charMatcher) Returns aPattern
that matches the last character found bycharMatcher
.static Substring.Pattern
Substring.leading
(CharPredicate matcher) Returns aPattern
that matches from the beginning of the input string, a non-empty sequence of leading characters identified bymatcher
.default CharPredicate
CharPredicate.or
(CharPredicate that) Returns aCharPredicate
that evaluates true if either this orthat
predicate evaluate to true.final Substring.Pattern
Substring.Pattern.separatedBy
(CharPredicate separator) Returns an otherwise equivalentPattern
, except it only matches if it's next to the beginning of the string, the end of the string, or theseparator
character(s).Substring.Pattern.separatedBy
(CharPredicate separatorBefore, CharPredicate separatorAfter) Returns an otherwise equivalentPattern
, except it requires the beginning of the match must either be the beginning of the string, or be separated from the rest of the string by theseparatorBefore
character; and the end of the match must either be the end of the string, or be separated from the rest of the string by theseparatorAfter
character.static Substring.Pattern
Substring.trailing
(CharPredicate matcher) Returns aPattern
that matches from the end of the input string, a non-empty sequence of trailing characters identified bymatcher
.CaseBreaker.withLowerCaseChars
(CharPredicate camelLower) Returns a new instance usingcamelLower
to identify lower case characters (don't forget to include digits if they should also be treated as lower case).CaseBreaker.withPunctuationChars
(CharPredicate punctuation) Returns a new instance usingpunctuation
to identify punctuation characters (ones that separate words but aren't themselves included in the result), for example if you want to support dash-case using the en dash (–) character.