Class RepeatCharPredicatePattern


  • class RepeatCharPredicatePattern
    extends Pattern
    • Field Detail

      • n

        private final int n
    • Constructor Detail

      • RepeatCharPredicatePattern

        RepeatCharPredicatePattern​(int n,
                                   CharPredicate predicate)
    • Method Detail

      • match

        public int match​(java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • matchRepeat

        static int matchRepeat​(int n,
                               CharPredicate predicate,
                               java.lang.CharSequence src,
                               int length,
                               int begin,
                               int acc)