Module java.base

Interface MatchResult

All Known Implementing Classes:
Matcher

public interface MatchResult
The result of a match operation.

This interface contains query methods used to determine the results of a match against a regular expression. The match boundaries, groups and group boundaries can be seen but not modified through a MatchResult.

Implementation Note:
Support for named groups is implemented by the default methods start(String), end(String) and group(String). They all make use of the map returned by namedGroups(), whose default implementation simply throws UnsupportedOperationException. It is thus sufficient to override namedGroups() for these methods to work. However, overriding them directly might be preferable for performance or other reasons.
Since:
1.5
See Also: