Class Match.IntermediateMatch<E>

java.lang.Object
edu.washington.cs.knowitall.regex.Match<E>
edu.washington.cs.knowitall.regex.Match.IntermediateMatch<E>
Type Parameters:
E -
Enclosing class:
Match<E>

protected static final class Match.IntermediateMatch<E> extends Match<E>
A match representation that is mutable but many method calls compute values instead of returning stored values. This is a good in-between while building a match object.
  • Constructor Details

    • IntermediateMatch

      protected IntermediateMatch()
  • Method Details

    • tokens

      public List<E> tokens()
      Specified by:
      tokens in class Match<E>
      Returns:
      all matched tokens.
    • groups

      public List<Match.Group<E>> groups()
      Specified by:
      groups in class Match<E>
      Returns:
      all matching groups (named and unnamed).
    • startIndex

      public int startIndex()
      Specified by:
      startIndex in class Match<E>
      Returns:
      the index of the first token matched (inclusive start).
    • endIndex

      public int endIndex()
      Specified by:
      endIndex in class Match<E>
      Returns:
      the index one past of the last token matched (exclusive end).