Document exceptions that can be thrown from MatchGroupCollection.get(name)

This commit is contained in:
Ilya Gorbunov
2018-11-16 19:52:51 +03:00
parent 8d0d6d1bf3
commit e81859b50d
2 changed files with 4 additions and 1 deletions
@@ -35,6 +35,8 @@ public interface MatchNamedGroupCollection : MatchGroupCollection {
/**
* Returns a named group with the specified [name].
* @return An instance of [MatchGroup] if the group with the specified [name] was matched or `null` otherwise.
* @throws IllegalArgumentException if there is no group with the specified [name] defined in the regex pattern.
* @throws UnsupportedOperationException if getting named groups isn't supported on the current platform.
*/
public operator fun get(name: String): MatchGroup?
}