Class CharMatcher.IsEither

All Implemented Interfaces:
Predicate<Character>, Predicate<Character>
Enclosing class:
CharMatcher

private static final class CharMatcher.IsEither extends CharMatcher.FastMatcher
Implementation of CharMatcher.anyOf(CharSequence) for exactly two characters.
  • Field Details

    • match1

      private final char match1
    • match2

      private final char match2
  • Constructor Details

    • IsEither

      IsEither(char match1, char match2)
  • 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 class CharMatcher
    • setBits

      void setBits(BitSet table)
      Description copied from class: CharMatcher
      Sets bits in table matched by this matcher.
      Overrides:
      setBits in class CharMatcher
    • toString

      public String toString()
      Description copied from class: CharMatcher
      Returns a string representation of this CharMatcher, such as CharMatcher.or(WHITESPACE, JAVA_DIGIT).
      Overrides:
      toString in class CharMatcher