Class CharMatcher.BitSetMatcher

  • All Implemented Interfaces:
    Predicate<java.lang.Character>, java.util.function.Predicate<java.lang.Character>
    Enclosing class:
    CharMatcher

    private static final class CharMatcher.BitSetMatcher
    extends CharMatcher.NamedFastMatcher
    Fast matcher using a BitSet table of matching characters.
    • Field Detail

      • table

        private final java.util.BitSet table
    • Constructor Detail

      • BitSetMatcher

        private BitSetMatcher​(java.util.BitSet table,
                              java.lang.String description)
    • Method Detail

      • 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 class CharMatcher
      • setBits

        void setBits​(java.util.BitSet bitSet)
        Description copied from class: CharMatcher
        Sets bits in table matched by this matcher.
        Overrides:
        setBits in class CharMatcher