Class MatchResult

    • Constructor Detail

      • MatchResult

        public MatchResult()
    • Method Detail

      • create

        public static MatchResult create​(Matcher matcher)
        Create a new MatchResult depending on the used implementation
        Parameters:
        matcher - Matcher object of the implementation
        Returns:
        MatchResult for the Matcher
      • groups

        public abstract int groups()
        Returns the number of groups (...) found
        Returns:
        Number of found groups
      • group

        public abstract String group​(int i)
        Return the content of group with the index i
        Parameters:
        i - index for the group
        Returns:
        Content of the group with the index i
      • beginOffset

        public abstract int beginOffset​(int i)
        The offset of the beginning of the match for the group with the index i
        Parameters:
        i - index for the group
        Returns:
        Offset of the group
      • endOffset

        public abstract int endOffset​(int i)
        The offset of the end of the match for the group with the index i
        Parameters:
        i - index for the group
        Returns:
        Offset of the group