abstract static class CharMatcher.FastMatcher extends CharMatcher
CharMatcher.FastMatcher, CharMatcher.NamedFastMatcher, CharMatcher.NegatedFastMatcher, CharMatcher.Whitespace
Constructor and Description |
---|
FastMatcher() |
Modifier and Type | Method and Description |
---|---|
CharMatcher |
negate()
Returns a matcher that matches any character not matched by this matcher.
|
CharMatcher |
precomputed()
Returns a
char matcher functionally equivalent to this one, but which may be faster to
query than the original; your mileage may vary. |
and, any, anyOf, apply, ascii, breakingWhitespace, collapseFrom, countIn, digit, forPredicate, indexIn, indexIn, inRange, invisible, is, isNot, javaDigit, javaIsoControl, javaLetter, javaLetterOrDigit, javaLowerCase, javaUpperCase, lastIndexIn, matches, matchesAllOf, matchesAnyOf, matchesNoneOf, none, noneOf, or, precomputedInternal, removeFrom, replaceFrom, replaceFrom, retainFrom, setBits, singleWidth, toString, trimAndCollapseFrom, trimFrom, trimLeadingFrom, trimTrailingFrom, whitespace
public final CharMatcher precomputed()
CharMatcher
char
matcher functionally equivalent to this one, but which may be faster to
query than the original; your mileage may vary. Precomputation takes time and is likely to be
worthwhile only if the precomputed matcher is queried many thousands of times.
This method has no effect (returns this
) when called in GWT: it's unclear whether a
precomputed matcher is faster, but it certainly consumes more memory, which doesn't seem like a
worthwhile tradeoff in a browser.
precomputed
in class CharMatcher
public CharMatcher negate()
CharMatcher
negate
in interface java.util.function.Predicate<java.lang.Character>
negate
in class CharMatcher