Class CharRangeMatcher

All Implemented Interfaces:
Cloneable, Matcher, Rule, GraphNode<Matcher>

public class CharRangeMatcher extends AbstractMatcher
A Matcher matching a single character out of a given range of characters.
  • Field Details

    • cLow

      public final char cLow
    • cHigh

      public final char cHigh
  • Constructor Details

    • CharRangeMatcher

      public CharRangeMatcher(char cLow, char cHigh)
  • Method Details

    • match

      public boolean match(MatcherContext context)
      Description copied from interface: Matcher
      Tries a match on the given MatcherContext.
      Parameters:
      context - the MatcherContext
      Returns:
      true if the match was successful
    • accept

      public <R> R accept(MatcherVisitor<R> visitor)
      Description copied from interface: Matcher
      Accepts the given matcher visitor.
      Parameters:
      visitor - the visitor
      Returns:
      the value returned by the given visitor