Class 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 Detail

      • IntermediateMatch

        protected IntermediateMatch()
    • Method Detail

      • tokens

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

        public java.util.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).