Class OptionalPattern

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

class OptionalPattern extends Pattern
  • Field Details

    • pattern

      private final Pattern pattern
  • Constructor Details

    • OptionalPattern

      OptionalPattern(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