Class CharMatcher.FastMatcher

    • Constructor Detail

      • FastMatcher

        FastMatcher()
    • Method Detail

      • precomputed

        public final CharMatcher precomputed()
        Description copied from class: CharMatcher
        Returns a 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.

        Overrides:
        precomputed in class CharMatcher
      • negate

        public CharMatcher negate()
        Description copied from class: CharMatcher
        Returns a matcher that matches any character not matched by this matcher.
        Specified by:
        negate in interface java.util.function.Predicate<java.lang.Character>
        Overrides:
        negate in class CharMatcher