Class OptionalPattern


  • class OptionalPattern
    extends Pattern
    • Field Detail

      • pattern

        private final Pattern pattern
    • Constructor Detail

      • OptionalPattern

        OptionalPattern​(Pattern pattern)
    • 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