Package com.google.common.base
Class CharMatcher.ForPredicate
java.lang.Object
com.google.common.base.CharMatcher
com.google.common.base.CharMatcher.ForPredicate
- Enclosing class:
CharMatcher
Implementation of
CharMatcher.forPredicate(Predicate)
.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.base.CharMatcher
CharMatcher.FastMatcher, CharMatcher.NamedFastMatcher, CharMatcher.Whitespace
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the result of applying this predicate toinput
(Java 8+ users, see notes in the class documentation above).boolean
matches
(char c) Determines a true or false value for the given character.toString()
Returns a string representation of thisCharMatcher
, such asCharMatcher.or(WHITESPACE, JAVA_DIGIT)
.Methods inherited from class com.google.common.base.CharMatcher
and, any, anyOf, ascii, breakingWhitespace, collapseFrom, countIn, digit, forPredicate, indexIn, indexIn, inRange, invisible, is, isNot, javaDigit, javaIsoControl, javaLetter, javaLetterOrDigit, javaLowerCase, javaUpperCase, lastIndexIn, matchesAllOf, matchesAnyOf, matchesNoneOf, negate, none, noneOf, or, precomputed, precomputedInternal, removeFrom, replaceFrom, replaceFrom, retainFrom, setBits, singleWidth, trimAndCollapseFrom, trimFrom, trimLeadingFrom, trimTrailingFrom, whitespace
-
Field Details
-
predicate
-
-
Constructor Details
-
ForPredicate
-
-
Method Details
-
matches
public boolean matches(char c) Description copied from class:CharMatcher
Determines a true or false value for the given character.- Specified by:
matches
in classCharMatcher
-
apply
Description copied from interface:Predicate
Returns the result of applying this predicate toinput
(Java 8+ users, see notes in the class documentation above). This method is generally expected, but not absolutely required, to have the following properties:- Its execution does not cause any observable side effects.
- The computation is consistent with equals; that is,
Objects.equal
(a, b)
implies thatpredicate.apply(a) == predicate.apply(b))
.
- Specified by:
apply
in interfacePredicate<Character>
- Overrides:
apply
in classCharMatcher
-
toString
Description copied from class:CharMatcher
Returns a string representation of thisCharMatcher
, such asCharMatcher.or(WHITESPACE, JAVA_DIGIT)
.- Overrides:
toString
in classCharMatcher
-