Stdlib documentation: clarified toMap behavior when a duplicate key is encountered.

This commit is contained in:
Ilya Gorbunov
2015-05-27 22:29:07 +03:00
parent 1fb4183bbb
commit fa24db435d
2 changed files with 56 additions and 28 deletions
@@ -98,7 +98,8 @@ fun snapshots(): List<GenericFunction> {
typeParam("K")
doc {
"""
Returns Map containing all the values from the given collection indexed by [selector].
Returns Map containing the values from the given collection indexed by [selector].
If any two elements would have the same key returned by [selector] the last one gets added to the map.
"""
}
returns("Map<K, T>")
@@ -155,7 +156,8 @@ fun snapshots(): List<GenericFunction> {
typeParam("V")
doc {
"""
Returns Map containing all the values provided by [transform] and indexed by [selector] from the given collection.
Returns Map containing the values provided by [transform] and indexed by [selector] from the given collection.
If any two elements would have the same key returned by [selector] the last one gets added to the map.
"""
}
returns("Map<K, V>")