Document exceptions that can be thrown from MatchGroupCollection.get(name)
This commit is contained in:
@@ -23,7 +23,8 @@ package kotlin.text
|
|||||||
* Returns a named group with the specified [name].
|
* 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.
|
* @return An instance of [MatchGroup] if the group with the specified [name] was matched or `null` otherwise.
|
||||||
* @throws [UnsupportedOperationException] if getting named groups isn't supported on the current platform.
|
* @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.
|
||||||
*/
|
*/
|
||||||
@SinceKotlin("1.2")
|
@SinceKotlin("1.2")
|
||||||
public operator fun MatchGroupCollection.get(name: String): MatchGroup? {
|
public operator fun MatchGroupCollection.get(name: String): MatchGroup? {
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ public interface MatchNamedGroupCollection : MatchGroupCollection {
|
|||||||
/**
|
/**
|
||||||
* Returns a named group with the specified [name].
|
* 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.
|
* @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?
|
public operator fun get(name: String): MatchGroup?
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user