diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 16655662d3e..2365a6592c1 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -5842,53 +5842,53 @@ public fun ShortArray.toList(): List { return this.toArrayList() } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun Array.toMap(selector: (T) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun BooleanArray.toMap(selector: (Boolean) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun ByteArray.toMap(selector: (Byte) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun CharArray.toMap(selector: (Char) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun DoubleArray.toMap(selector: (Double) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun FloatArray.toMap(selector: (Float) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun IntArray.toMap(selector: (Int) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun LongArray.toMap(selector: (Long) -> K): Map { return toMapBy(selector) } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun ShortArray.toMap(selector: (Short) -> K): Map { return toMapBy(selector) } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun Array.toMap(selector: (T) -> K, transform: (T) -> V): Map { @@ -5901,7 +5901,7 @@ public inline fun Array.toMap(selector: (T) -> K, transform: (T } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun BooleanArray.toMap(selector: (Boolean) -> K, transform: (Boolean) -> V): Map { @@ -5914,7 +5914,7 @@ public inline fun BooleanArray.toMap(selector: (Boolean) -> K, transform: } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun ByteArray.toMap(selector: (Byte) -> K, transform: (Byte) -> V): Map { @@ -5927,7 +5927,7 @@ public inline fun ByteArray.toMap(selector: (Byte) -> K, transform: (Byte } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun CharArray.toMap(selector: (Char) -> K, transform: (Char) -> V): Map { @@ -5940,7 +5940,7 @@ public inline fun CharArray.toMap(selector: (Char) -> K, transform: (Char } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun DoubleArray.toMap(selector: (Double) -> K, transform: (Double) -> V): Map { @@ -5953,7 +5953,7 @@ public inline fun DoubleArray.toMap(selector: (Double) -> K, transform: ( } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun FloatArray.toMap(selector: (Float) -> K, transform: (Float) -> V): Map { @@ -5966,7 +5966,7 @@ public inline fun FloatArray.toMap(selector: (Float) -> K, transform: (Fl } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun IntArray.toMap(selector: (Int) -> K, transform: (Int) -> V): Map { @@ -5979,7 +5979,7 @@ public inline fun IntArray.toMap(selector: (Int) -> K, transform: (Int) - } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun LongArray.toMap(selector: (Long) -> K, transform: (Long) -> V): Map { @@ -5992,7 +5992,7 @@ public inline fun LongArray.toMap(selector: (Long) -> K, transform: (Long } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given array. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun ShortArray.toMap(selector: (Short) -> K, transform: (Short) -> V): Map { @@ -6005,7 +6005,7 @@ public inline fun ShortArray.toMap(selector: (Short) -> K, transform: (Sh } /** - * Returns Map containing the elements from the given array indexed by the key + * Returns a [Map] containing the elements from the given array indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ @@ -6019,7 +6019,7 @@ public inline fun Array.toMapBy(selector: (T) -> K): Map { } /** - * Returns Map containing the elements from the given array indexed by the key + * Returns a [Map] containing the elements from the given array indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ @@ -6033,7 +6033,7 @@ public inline fun BooleanArray.toMapBy(selector: (Boolean) -> K): Map ByteArray.toMapBy(selector: (Byte) -> K): Map { } /** - * Returns Map containing the elements from the given array indexed by the key + * Returns a [Map] containing the elements from the given array indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ @@ -6061,7 +6061,7 @@ public inline fun CharArray.toMapBy(selector: (Char) -> K): Map { } /** - * Returns Map containing the elements from the given array indexed by the key + * Returns a [Map] containing the elements from the given array indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ @@ -6075,7 +6075,7 @@ public inline fun DoubleArray.toMapBy(selector: (Double) -> K): Map FloatArray.toMapBy(selector: (Float) -> K): Map } /** - * Returns Map containing the elements from the given array indexed by the key + * Returns a [Map] containing the elements from the given array indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ @@ -6103,7 +6103,7 @@ public inline fun IntArray.toMapBy(selector: (Int) -> K): Map { } /** - * Returns Map containing the elements from the given array indexed by the key + * Returns a [Map] containing the elements from the given array indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ @@ -6117,7 +6117,7 @@ public inline fun LongArray.toMapBy(selector: (Long) -> K): Map { } /** - * Returns Map containing the elements from the given array indexed by the key + * Returns a [Map] containing the elements from the given array indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ diff --git a/libraries/stdlib/src/generated/_Collections.kt b/libraries/stdlib/src/generated/_Collections.kt index f289f515c07..73d6244d8c5 100644 --- a/libraries/stdlib/src/generated/_Collections.kt +++ b/libraries/stdlib/src/generated/_Collections.kt @@ -1064,13 +1064,13 @@ public fun Iterable.toList(): List { return this.toArrayList() } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun Iterable.toMap(selector: (T) -> K): Map { return toMapBy(selector) } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given collection. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given collection. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun Iterable.toMap(selector: (T) -> K, transform: (T) -> V): Map { @@ -1083,7 +1083,7 @@ public inline fun Iterable.toMap(selector: (T) -> K, transform: (T) } /** - * Returns Map containing the elements from the given collection indexed by the key + * Returns a [Map] containing the elements from the given collection indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ diff --git a/libraries/stdlib/src/generated/_Sequences.kt b/libraries/stdlib/src/generated/_Sequences.kt index 97f62ca5bee..c60c3b2cee5 100644 --- a/libraries/stdlib/src/generated/_Sequences.kt +++ b/libraries/stdlib/src/generated/_Sequences.kt @@ -522,13 +522,13 @@ public fun Sequence.toList(): List { return this.toArrayList() } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun Sequence.toMap(selector: (T) -> K): Map { return toMapBy(selector) } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given sequence. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to elements of the given sequence. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ public inline fun Sequence.toMap(selector: (T) -> K, transform: (T) -> V): Map { @@ -540,7 +540,7 @@ public inline fun Sequence.toMap(selector: (T) -> K, transform: (T) } /** - * Returns Map containing the elements from the given sequence indexed by the key + * Returns a [Map] containing the elements from the given sequence indexed by the key * returned from [selector] function applied to each element. * If any two elements would have the same key returned by [selector] the last one gets added to the map. */ diff --git a/libraries/stdlib/src/generated/_Strings.kt b/libraries/stdlib/src/generated/_Strings.kt index a157fd71566..1f631223ec3 100644 --- a/libraries/stdlib/src/generated/_Strings.kt +++ b/libraries/stdlib/src/generated/_Strings.kt @@ -805,7 +805,7 @@ public fun String.toList(): List { return this.toArrayList() } -@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)")) +@Deprecated("Use toMapBy instead.", ReplaceWith("toMapBy(selector)"), level = DeprecationLevel.HIDDEN) public inline fun CharSequence.toMap(selector: (Char) -> K): Map { return toMapBy(selector) } @@ -816,7 +816,7 @@ public inline fun String.toMap(selector: (Char) -> K): Map { } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to characters of the given char sequence. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to characters of the given char sequence. * If any two characters would have the same key returned by [selector] the last one gets added to the map. */ public inline fun CharSequence.toMap(selector: (Char) -> K, transform: (Char) -> V): Map { @@ -829,7 +829,7 @@ public inline fun CharSequence.toMap(selector: (Char) -> K, transform: (C } /** - * Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to characters of the given string. + * Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to characters of the given string. * If any two characters would have the same key returned by [selector] the last one gets added to the map. */ @Deprecated("Provided for binary compatibility", level = DeprecationLevel.HIDDEN) @@ -843,7 +843,7 @@ public inline fun String.toMap(selector: (Char) -> K, transform: (Char) - } /** - * Returns Map containing the characters from the given char sequence indexed by the key + * Returns a [Map] containing the characters from the given char sequence indexed by the key * returned from [selector] function applied to each character. * If any two characters would have the same key returned by [selector] the last one gets added to the map. */ @@ -857,7 +857,7 @@ public inline fun CharSequence.toMapBy(selector: (Char) -> K): Map } /** - * Returns Map containing the characters from the given string indexed by the key + * Returns a [Map] containing the characters from the given string indexed by the key * returned from [selector] function applied to each character. * If any two characters would have the same key returned by [selector] the last one gets added to the map. */ diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt index bd35dca5d88..e9edc58c30b 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/Snapshots.kt @@ -124,7 +124,7 @@ fun snapshots(): List { include(CharSequences, Strings) typeParam("K") returns("Map") - deprecate(Deprecation("Use toMapBy instead.", replaceWith = "toMapBy(selector)")) + deprecate(Deprecation("Use toMapBy instead.", replaceWith = "toMapBy(selector)", level = DeprecationLevel.HIDDEN)) } templates add f("toMapBy(selector: (T) -> K)") { @@ -132,7 +132,7 @@ fun snapshots(): List { typeParam("K") doc { f -> """ - Returns Map containing the ${f.element.pluralize()} from the given ${f.collection} indexed by the key + Returns a [Map] containing the ${f.element.pluralize()} from the given ${f.collection} indexed by the key returned from [selector] function applied to each ${f.element}. If any two ${f.element.pluralize()} would have the same key returned by [selector] the last one gets added to the map. """ @@ -192,7 +192,7 @@ fun snapshots(): List { typeParam("V") doc { f -> """ - Returns Map containing the values provided by [transform] and indexed by [selector] functions applied to ${f.element.pluralize()} of the given ${f.collection}. + Returns a [Map] containing the values provided by [transform] and indexed by [selector] functions applied to ${f.element.pluralize()} of the given ${f.collection}. If any two ${f.element.pluralize()} would have the same key returned by [selector] the last one gets added to the map. """ }