Class RepeatCharPredicatePattern

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

class RepeatCharPredicatePattern extends Pattern
  • Field Details

    • n

      private final int n
    • predicate

      private final CharPredicate predicate
  • Constructor Details

    • RepeatCharPredicatePattern

      RepeatCharPredicatePattern(int n, CharPredicate predicate)
  • 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, CharPredicate predicate, CharSequence src, int length, int begin, int acc)