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.NegatedFastMatcher, CharMatcher.Whitespace -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the result of applying this predicate toinput(Java 8 users, see notes in the class documentation above).booleanmatches(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:CharMatcherDetermines a true or false value for the given character.- Specified by:
matchesin classCharMatcher
-
apply
Description copied from interface:PredicateReturns 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:
applyin interfacePredicate<Character>- Overrides:
applyin classCharMatcher
-
toString
Description copied from class:CharMatcherReturns a string representation of thisCharMatcher, such asCharMatcher.or(WHITESPACE, JAVA_DIGIT).- Overrides:
toStringin classCharMatcher
-