changed groupBy method signature (in standard library)
This commit is contained in:
@@ -197,7 +197,7 @@ public inline fun <T> Array<T>.reduceRight(operation: (T, T) -> T): T = reverse(
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <T, K> Array<T>.groupBy(toKey: (T) -> K) : Map<K, MutableList<T>> = groupByTo<T,K>(HashMap<K, MutableList<T>>(), toKey)
|
||||
public inline fun <T, K> Array<T>.groupBy(toKey: (T) -> K) : Map<K, List<T>> = groupByTo<T,K>(HashMap<K, MutableList<T>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun BooleanArray.reduceRight(operation: (Boolean, Boolean) -> Bool
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> BooleanArray.groupBy(toKey: (Boolean) -> K) : Map<K, MutableList<Boolean>> = groupByTo<K>(HashMap<K, MutableList<Boolean>>(), toKey)
|
||||
public inline fun <K> BooleanArray.groupBy(toKey: (Boolean) -> K) : Map<K, List<Boolean>> = groupByTo<K>(HashMap<K, MutableList<Boolean>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun ByteArray.reduceRight(operation: (Byte, Byte) -> Byte): Byte =
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> ByteArray.groupBy(toKey: (Byte) -> K) : Map<K, MutableList<Byte>> = groupByTo<K>(HashMap<K, MutableList<Byte>>(), toKey)
|
||||
public inline fun <K> ByteArray.groupBy(toKey: (Byte) -> K) : Map<K, List<Byte>> = groupByTo<K>(HashMap<K, MutableList<Byte>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun CharArray.reduceRight(operation: (Char, Char) -> Char): Char =
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> CharArray.groupBy(toKey: (Char) -> K) : Map<K, MutableList<Char>> = groupByTo<K>(HashMap<K, MutableList<Char>>(), toKey)
|
||||
public inline fun <K> CharArray.groupBy(toKey: (Char) -> K) : Map<K, List<Char>> = groupByTo<K>(HashMap<K, MutableList<Char>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun DoubleArray.reduceRight(operation: (Double, Double) -> Double)
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> DoubleArray.groupBy(toKey: (Double) -> K) : Map<K, MutableList<Double>> = groupByTo<K>(HashMap<K, MutableList<Double>>(), toKey)
|
||||
public inline fun <K> DoubleArray.groupBy(toKey: (Double) -> K) : Map<K, List<Double>> = groupByTo<K>(HashMap<K, MutableList<Double>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun FloatArray.reduceRight(operation: (Float, Float) -> Float): Fl
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> FloatArray.groupBy(toKey: (Float) -> K) : Map<K, MutableList<Float>> = groupByTo<K>(HashMap<K, MutableList<Float>>(), toKey)
|
||||
public inline fun <K> FloatArray.groupBy(toKey: (Float) -> K) : Map<K, List<Float>> = groupByTo<K>(HashMap<K, MutableList<Float>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun IntArray.reduceRight(operation: (Int, Int) -> Int): Int = reve
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> IntArray.groupBy(toKey: (Int) -> K) : Map<K, MutableList<Int>> = groupByTo<K>(HashMap<K, MutableList<Int>>(), toKey)
|
||||
public inline fun <K> IntArray.groupBy(toKey: (Int) -> K) : Map<K, List<Int>> = groupByTo<K>(HashMap<K, MutableList<Int>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -196,7 +196,7 @@ public inline fun <T> Iterator<T>.reduceRight(operation: (T, T) -> T): T = rever
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <T, K> Iterator<T>.groupBy(toKey: (T) -> K) : Map<K, MutableList<T>> = groupByTo<T,K>(HashMap<K, MutableList<T>>(), toKey)
|
||||
public inline fun <T, K> Iterator<T>.groupBy(toKey: (T) -> K) : Map<K, List<T>> = groupByTo<T,K>(HashMap<K, MutableList<T>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun LongArray.reduceRight(operation: (Long, Long) -> Long): Long =
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> LongArray.groupBy(toKey: (Long) -> K) : Map<K, MutableList<Long>> = groupByTo<K>(HashMap<K, MutableList<Long>>(), toKey)
|
||||
public inline fun <K> LongArray.groupBy(toKey: (Long) -> K) : Map<K, List<Long>> = groupByTo<K>(HashMap<K, MutableList<Long>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -197,7 +197,7 @@ public inline fun ShortArray.reduceRight(operation: (Short, Short) -> Short): Sh
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <K> ShortArray.groupBy(toKey: (Short) -> K) : Map<K, MutableList<Short>> = groupByTo<K>(HashMap<K, MutableList<Short>>(), toKey)
|
||||
public inline fun <K> ShortArray.groupBy(toKey: (Short) -> K) : Map<K, List<Short>> = groupByTo<K>(HashMap<K, MutableList<Short>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
@@ -188,7 +188,7 @@ public inline fun <T> Iterable<T>.reduceRight(operation: (T, T) -> T): T = rever
|
||||
*
|
||||
* @includeFunctionBody ../../test/CollectionTest.kt groupBy
|
||||
*/
|
||||
public inline fun <T, K> Iterable<T>.groupBy(toKey: (T) -> K) : Map<K, MutableList<T>> = groupByTo<T,K>(HashMap<K, MutableList<T>>(), toKey)
|
||||
public inline fun <T, K> Iterable<T>.groupBy(toKey: (T) -> K) : Map<K, List<T>> = groupByTo<T,K>(HashMap<K, MutableList<T>>(), toKey)
|
||||
|
||||
/**
|
||||
* Groups the elements in the collection into the given [[Map]] using the supplied *toKey* function to calculate the key to group the elements by
|
||||
|
||||
Reference in New Issue
Block a user