Deprecate sumBy and sumByDouble with WARNING
This commit is contained in:
@@ -8853,84 +8853,140 @@ public fun kotlin.collections.Iterable<kotlin.ULong>.sum(): kotlin.ULong
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})
|
||||
public fun kotlin.collections.Iterable<kotlin.UShort>.sum(): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.Array<out T>.sumBy(selector: (T) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.BooleanArray.sumBy(selector: (kotlin.Boolean) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ByteArray.sumBy(selector: (kotlin.Byte) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharArray.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.DoubleArray.sumBy(selector: (kotlin.Double) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.FloatArray.sumBy(selector: (kotlin.Float) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.IntArray.sumBy(selector: (kotlin.Int) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.LongArray.sumBy(selector: (kotlin.Long) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ShortArray.sumBy(selector: (kotlin.Short) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UByteArray.sumBy(selector: (kotlin.UByte) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UIntArray.sumBy(selector: (kotlin.UInt) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.ULongArray.sumBy(selector: (kotlin.ULong) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UShortArray.sumBy(selector: (kotlin.UShort) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.collections.Iterable<T>.sumBy(selector: (T) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.Array<out T>.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.BooleanArray.sumByDouble(selector: (kotlin.Boolean) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ByteArray.sumByDouble(selector: (kotlin.Byte) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharArray.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.DoubleArray.sumByDouble(selector: (kotlin.Double) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.FloatArray.sumByDouble(selector: (kotlin.Float) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.IntArray.sumByDouble(selector: (kotlin.Int) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.LongArray.sumByDouble(selector: (kotlin.Long) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ShortArray.sumByDouble(selector: (kotlin.Short) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UByteArray.sumByDouble(selector: (kotlin.UByte) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UIntArray.sumByDouble(selector: (kotlin.UInt) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.ULongArray.sumByDouble(selector: (kotlin.ULong) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UShortArray.sumByDouble(selector: (kotlin.UShort) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.collections.Iterable<T>.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
|
||||
@@ -541,8 +541,12 @@ public fun kotlin.sequences.Sequence<kotlin.ULong>.sum(): kotlin.ULong
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})
|
||||
public fun kotlin.sequences.Sequence<kotlin.UShort>.sum(): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.sequences.Sequence<T>.sumBy(selector: (T) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.sequences.Sequence<T>.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
|
||||
@@ -879,8 +879,12 @@ public fun kotlin.String.substringBeforeLast(delimiter: kotlin.Char, missingDeli
|
||||
|
||||
public fun kotlin.String.substringBeforeLast(delimiter: kotlin.String, missingDelimiterValue: kotlin.String = ...): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharSequence.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharSequence.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
|
||||
@@ -8817,84 +8817,140 @@ public fun kotlin.collections.Iterable<kotlin.ULong>.sum(): kotlin.ULong
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})
|
||||
public fun kotlin.collections.Iterable<kotlin.UShort>.sum(): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.Array<out T>.sumBy(selector: (T) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.BooleanArray.sumBy(selector: (kotlin.Boolean) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ByteArray.sumBy(selector: (kotlin.Byte) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharArray.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.DoubleArray.sumBy(selector: (kotlin.Double) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.FloatArray.sumBy(selector: (kotlin.Float) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.IntArray.sumBy(selector: (kotlin.Int) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.LongArray.sumBy(selector: (kotlin.Long) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ShortArray.sumBy(selector: (kotlin.Short) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UByteArray.sumBy(selector: (kotlin.UByte) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UIntArray.sumBy(selector: (kotlin.UInt) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.ULongArray.sumBy(selector: (kotlin.ULong) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UShortArray.sumBy(selector: (kotlin.UShort) -> kotlin.UInt): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.collections.Iterable<T>.sumBy(selector: (T) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.Array<out T>.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.BooleanArray.sumByDouble(selector: (kotlin.Boolean) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ByteArray.sumByDouble(selector: (kotlin.Byte) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharArray.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.DoubleArray.sumByDouble(selector: (kotlin.Double) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.FloatArray.sumByDouble(selector: (kotlin.Float) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.IntArray.sumByDouble(selector: (kotlin.Int) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.LongArray.sumByDouble(selector: (kotlin.Long) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.ShortArray.sumByDouble(selector: (kotlin.Short) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UByteArray.sumByDouble(selector: (kotlin.UByte) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UIntArray.sumByDouble(selector: (kotlin.UInt) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.ULongArray.sumByDouble(selector: (kotlin.ULong) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@kotlin.SinceKotlin(version = "1.3")
|
||||
@kotlin.ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun kotlin.UShortArray.sumByDouble(selector: (kotlin.UShort) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.collections.Iterable<T>.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
|
||||
@@ -541,8 +541,12 @@ public fun kotlin.sequences.Sequence<kotlin.ULong>.sum(): kotlin.ULong
|
||||
@kotlin.WasExperimental(markerClass = {kotlin.ExperimentalUnsignedTypes::class})
|
||||
public fun kotlin.sequences.Sequence<kotlin.UShort>.sum(): kotlin.UInt
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.sequences.Sequence<T>.sumBy(selector: (T) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> kotlin.sequences.Sequence<T>.sumByDouble(selector: (T) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
|
||||
@@ -879,8 +879,12 @@ public fun kotlin.String.substringBeforeLast(delimiter: kotlin.Char, missingDeli
|
||||
|
||||
public fun kotlin.String.substringBeforeLast(delimiter: kotlin.String, missingDelimiterValue: kotlin.String = ...): kotlin.String
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharSequence.sumBy(selector: (kotlin.Char) -> kotlin.Int): kotlin.Int
|
||||
|
||||
@kotlin.Deprecated(message = "Use sumOf instead.", replaceWith = kotlin.ReplaceWith(expression = "this.sumOf(selector)", imports = {}))
|
||||
@kotlin.DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun kotlin.CharSequence.sumByDouble(selector: (kotlin.Char) -> kotlin.Double): kotlin.Double
|
||||
|
||||
@kotlin.SinceKotlin(version = "1.4")
|
||||
|
||||
@@ -21153,6 +21153,8 @@ public inline fun <R> CharArray.scanIndexed(initial: R, operation: (index: Int,
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> Array<out T>.sumBy(selector: (T) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21164,6 +21166,8 @@ public inline fun <T> Array<out T>.sumBy(selector: (T) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun ByteArray.sumBy(selector: (Byte) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21175,6 +21179,8 @@ public inline fun ByteArray.sumBy(selector: (Byte) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun ShortArray.sumBy(selector: (Short) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21186,6 +21192,8 @@ public inline fun ShortArray.sumBy(selector: (Short) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun IntArray.sumBy(selector: (Int) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21197,6 +21205,8 @@ public inline fun IntArray.sumBy(selector: (Int) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun LongArray.sumBy(selector: (Long) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21208,6 +21218,8 @@ public inline fun LongArray.sumBy(selector: (Long) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun FloatArray.sumBy(selector: (Float) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21219,6 +21231,8 @@ public inline fun FloatArray.sumBy(selector: (Float) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun DoubleArray.sumBy(selector: (Double) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21230,6 +21244,8 @@ public inline fun DoubleArray.sumBy(selector: (Double) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun BooleanArray.sumBy(selector: (Boolean) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21241,6 +21257,8 @@ public inline fun BooleanArray.sumBy(selector: (Boolean) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun CharArray.sumBy(selector: (Char) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -21252,6 +21270,8 @@ public inline fun CharArray.sumBy(selector: (Char) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> Array<out T>.sumByDouble(selector: (T) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21263,6 +21283,8 @@ public inline fun <T> Array<out T>.sumByDouble(selector: (T) -> Double): Double
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun ByteArray.sumByDouble(selector: (Byte) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21274,6 +21296,8 @@ public inline fun ByteArray.sumByDouble(selector: (Byte) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun ShortArray.sumByDouble(selector: (Short) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21285,6 +21309,8 @@ public inline fun ShortArray.sumByDouble(selector: (Short) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun IntArray.sumByDouble(selector: (Int) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21296,6 +21322,8 @@ public inline fun IntArray.sumByDouble(selector: (Int) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun LongArray.sumByDouble(selector: (Long) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21307,6 +21335,8 @@ public inline fun LongArray.sumByDouble(selector: (Long) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun FloatArray.sumByDouble(selector: (Float) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21318,6 +21348,8 @@ public inline fun FloatArray.sumByDouble(selector: (Float) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun DoubleArray.sumByDouble(selector: (Double) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21329,6 +21361,8 @@ public inline fun DoubleArray.sumByDouble(selector: (Double) -> Double): Double
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun BooleanArray.sumByDouble(selector: (Boolean) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
@@ -21340,6 +21374,8 @@ public inline fun BooleanArray.sumByDouble(selector: (Boolean) -> Double): Doubl
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun CharArray.sumByDouble(selector: (Char) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
|
||||
@@ -2814,6 +2814,8 @@ public inline fun <T, R> Iterable<T>.scanIndexed(initial: R, operation: (index:
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the collection.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> Iterable<T>.sumBy(selector: (T) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -2825,6 +2827,8 @@ public inline fun <T> Iterable<T>.sumBy(selector: (T) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the collection.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> Iterable<T>.sumByDouble(selector: (T) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
|
||||
@@ -2257,6 +2257,8 @@ public fun <T, R> Sequence<T>.scanIndexed(initial: R, operation: (index: Int, ac
|
||||
*
|
||||
* The operation is _terminal_.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> Sequence<T>.sumBy(selector: (T) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -2270,6 +2272,8 @@ public inline fun <T> Sequence<T>.sumBy(selector: (T) -> Int): Int {
|
||||
*
|
||||
* The operation is _terminal_.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun <T> Sequence<T>.sumByDouble(selector: (T) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
|
||||
@@ -2003,6 +2003,8 @@ public inline fun <R> CharSequence.scanIndexed(initial: R, operation: (index: In
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each character in the char sequence.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun CharSequence.sumBy(selector: (Char) -> Int): Int {
|
||||
var sum: Int = 0
|
||||
for (element in this) {
|
||||
@@ -2014,6 +2016,8 @@ public inline fun CharSequence.sumBy(selector: (Char) -> Int): Int {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each character in the char sequence.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
public inline fun CharSequence.sumByDouble(selector: (Char) -> Double): Double {
|
||||
var sum: Double = 0.0
|
||||
for (element in this) {
|
||||
|
||||
@@ -9549,6 +9549,8 @@ public inline fun <R> UShortArray.scanIndexed(initial: R, operation: (index: Int
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -9563,6 +9565,8 @@ public inline fun UIntArray.sumBy(selector: (UInt) -> UInt): UInt {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -9577,6 +9581,8 @@ public inline fun ULongArray.sumBy(selector: (ULong) -> UInt): UInt {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -9591,6 +9597,8 @@ public inline fun UByteArray.sumBy(selector: (UByte) -> UInt): UInt {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -9605,6 +9613,8 @@ public inline fun UShortArray.sumBy(selector: (UShort) -> UInt): UInt {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -9619,6 +9629,8 @@ public inline fun UIntArray.sumByDouble(selector: (UInt) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -9633,6 +9645,8 @@ public inline fun ULongArray.sumByDouble(selector: (ULong) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -9647,6 +9661,8 @@ public inline fun UByteArray.sumByDouble(selector: (UByte) -> Double): Double {
|
||||
/**
|
||||
* Returns the sum of all values produced by [selector] function applied to each element in the array.
|
||||
*/
|
||||
@Deprecated("Use sumOf instead.", ReplaceWith("this.sumOf(selector)"))
|
||||
@DeprecatedSinceKotlin(warningSince = "1.5")
|
||||
@SinceKotlin("1.3")
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
@@ -10489,7 +10505,7 @@ public inline fun ULongArray.sum(): ULong {
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun UByteArray.sum(): UInt {
|
||||
return sumBy { it.toUInt() }
|
||||
return sumOf { it.toUInt() }
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -10499,6 +10515,6 @@ public inline fun UByteArray.sum(): UInt {
|
||||
@ExperimentalUnsignedTypes
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun UShortArray.sum(): UInt {
|
||||
return sumBy { it.toUInt() }
|
||||
return sumOf { it.toUInt() }
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ import kotlin.contracts.*
|
||||
* @sample samples.collections.Arrays.Transformations.flattenArray
|
||||
*/
|
||||
public fun <T> Array<out Array<out T>>.flatten(): List<T> {
|
||||
val result = ArrayList<T>(sumBy { it.size })
|
||||
val result = ArrayList<T>(sumOf { it.size })
|
||||
for (element in this) {
|
||||
result.addAll(element)
|
||||
}
|
||||
|
||||
@@ -417,6 +417,7 @@ abstract class IterableTests<T : Iterable<String>>(val createFrom: (Array<out St
|
||||
expect(0) { empty.count { it.startsWith("x") } }
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Test
|
||||
fun sumBy() {
|
||||
expect(6) { data.sumBy { it.length } }
|
||||
|
||||
@@ -327,6 +327,7 @@ class UnsignedArraysTest {
|
||||
assertEquals(3, ulongArrayOf(2u, 3u, 4u).count { it > 1uL })
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Test
|
||||
fun sumBy() {
|
||||
assertEquals(3u, ubyteArrayOf(0, 1, 2).sumBy { it.toUInt() })
|
||||
@@ -335,6 +336,7 @@ class UnsignedArraysTest {
|
||||
assertEquals(6u, ulongArrayOf(2, 3, 4).sumBy { (it - 1u).toUInt() })
|
||||
}
|
||||
|
||||
@Suppress("DEPRECATION")
|
||||
@Test
|
||||
fun sumByDouble() {
|
||||
assertEquals(3.0, ubyteArrayOf(0, 1, 2).sumByDouble { it.toDouble() })
|
||||
|
||||
@@ -221,6 +221,8 @@ object Aggregates : TemplateGroupBase() {
|
||||
includeDefault()
|
||||
include(CharSequences, ArraysOfUnsigned)
|
||||
} builder {
|
||||
deprecate(Deprecation("Use sumOf instead.", "this.sumOf(selector)", DeprecationLevel.WARNING, warningSince = "1.5"))
|
||||
|
||||
inline()
|
||||
doc { "Returns the sum of all values produced by [selector] function applied to each ${f.element} in the ${f.collection}." }
|
||||
returns("Int")
|
||||
@@ -291,6 +293,8 @@ object Aggregates : TemplateGroupBase() {
|
||||
includeDefault()
|
||||
include(CharSequences, ArraysOfUnsigned)
|
||||
} builder {
|
||||
deprecate(Deprecation("Use sumOf instead.", "this.sumOf(selector)", DeprecationLevel.WARNING, warningSince = "1.5"))
|
||||
|
||||
inline()
|
||||
specialFor(ArraysOfUnsigned) { inlineOnly() }
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ object Numeric : TemplateGroupBase() {
|
||||
if (p == p.sumType())
|
||||
"return storage.sum().to${p.sumType().name}()"
|
||||
else
|
||||
"return sumBy { it.to${p.sumType().name}() }"
|
||||
"return sumOf { it.to${p.sumType().name}() }"
|
||||
}
|
||||
}
|
||||
specialFor(Iterables, Sequences, ArraysOfObjects, ArraysOfPrimitives) {
|
||||
|
||||
Reference in New Issue
Block a user