Class RepeatPattern

java.lang.Object
org.jparsec.pattern.Pattern
org.jparsec.pattern.RepeatPattern

class RepeatPattern extends Pattern
  • Field Details

    • n

      private final int n
    • pattern

      private final Pattern pattern
  • Constructor Details

    • RepeatPattern

      RepeatPattern(int n, Pattern pattern)
  • Method Details

    • match

      public int match(CharSequence src, int begin, int end)
      Description copied from class: Pattern
      Matches character range against the pattern. The length of the range is end - begin.
      Specified by:
      match in class Pattern
      Parameters:
      src - the source string.
      begin - the beginning index in the sequence.
      end - the end index of the source string (exclusive). NOTE: the range is [begin, end).
      Returns:
      the number of characters matched. MISMATCH otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • matchRepeat

      static int matchRepeat(int n, Pattern pattern, CharSequence src, int len, int from, int acc)