Correct reference to withDefault method in documentation.
This commit is contained in:
@@ -6,7 +6,7 @@ import kotlin.platform.platformName
|
|||||||
/**
|
/**
|
||||||
* Returns the value for the given key, or the implicit default value for this map.
|
* Returns the value for the given key, or the implicit default value for this map.
|
||||||
* By default no implicit value is provided for maps and a [NoSuchElementException] is thrown.
|
* By default no implicit value is provided for maps and a [NoSuchElementException] is thrown.
|
||||||
* To create a map with implicit default value use [Map.withDefault] method.
|
* To create a map with implicit default value use [withDefault] method.
|
||||||
*
|
*
|
||||||
* @throws NoSuchElementException when the map doesn't contain value for the specified key and no implicit default was provided for that map.
|
* @throws NoSuchElementException when the map doesn't contain value for the specified key and no implicit default was provided for that map.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import kotlin.platform.platformName
|
|||||||
* @param property the metadata for the property, used to get the name of property and lookup the value corresponding to this name in the map.
|
* @param property the metadata for the property, used to get the name of property and lookup the value corresponding to this name in the map.
|
||||||
* @return the property value.
|
* @return the property value.
|
||||||
*
|
*
|
||||||
* @throws NoSuchElementException when the map doesn't contain value for the property name and doesn't provide an implicit default (see [Map.withDefault]).
|
* @throws NoSuchElementException when the map doesn't contain value for the property name and doesn't provide an implicit default (see [withDefault]).
|
||||||
*/
|
*/
|
||||||
public fun <V> Map<in String, *>.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
public fun <V> Map<in String, *>.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ public fun <V> Map<in String, *>.get(thisRef: Any?, property: PropertyMetadata):
|
|||||||
* @param property the metadata for the property, used to get the name of property and lookup the value corresponding to this name in the map.
|
* @param property the metadata for the property, used to get the name of property and lookup the value corresponding to this name in the map.
|
||||||
* @return the property value.
|
* @return the property value.
|
||||||
*
|
*
|
||||||
* @throws NoSuchElementException when the map doesn't contain value for the property name and doesn't provide an implicit default (see [Map.withDefault]).
|
* @throws NoSuchElementException when the map doesn't contain value for the property name and doesn't provide an implicit default (see [withDefault]).
|
||||||
*/
|
*/
|
||||||
platformName("getVar")
|
platformName("getVar")
|
||||||
public fun <V> MutableMap<in String, in V>.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
public fun <V> MutableMap<in String, in V>.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
||||||
|
|||||||
Reference in New Issue
Block a user