Got rid of "tuple" word all over the code.
This commit is contained in:
@@ -360,7 +360,7 @@ public inline fun <T> Array<out T>.withIndices() : Iterator<Pair<Int, T>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <T, R: Comparable<R>> Array<out T>.sortBy(f: (T) -> R) : List<T> {
|
||||
val sortedList = toCollection(ArrayList<T>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun BooleanArray.withIndices() : Iterator<Pair<Int, Boolean>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> BooleanArray.sortBy(f: (Boolean) -> R) : List<Boolean> {
|
||||
val sortedList = toCollection(ArrayList<Boolean>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun ByteArray.withIndices() : Iterator<Pair<Int, Byte>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> ByteArray.sortBy(f: (Byte) -> R) : List<Byte> {
|
||||
val sortedList = toCollection(ArrayList<Byte>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun CharArray.withIndices() : Iterator<Pair<Int, Char>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> CharArray.sortBy(f: (Char) -> R) : List<Char> {
|
||||
val sortedList = toCollection(ArrayList<Char>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun DoubleArray.withIndices() : Iterator<Pair<Int, Double>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> DoubleArray.sortBy(f: (Double) -> R) : List<Double> {
|
||||
val sortedList = toCollection(ArrayList<Double>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun FloatArray.withIndices() : Iterator<Pair<Int, Float>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> FloatArray.sortBy(f: (Float) -> R) : List<Float> {
|
||||
val sortedList = toCollection(ArrayList<Float>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun IntArray.withIndices() : Iterator<Pair<Int, Int>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> IntArray.sortBy(f: (Int) -> R) : List<Int> {
|
||||
val sortedList = toCollection(ArrayList<Int>())
|
||||
|
||||
@@ -245,7 +245,7 @@ public inline fun <T> Iterable<T>.withIndices() : Iterator<Pair<Int, T>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <T, R: Comparable<R>> Iterable<T>.sortBy(f: (T) -> R) : List<T> {
|
||||
val sortedList = toCollection(ArrayList<T>())
|
||||
|
||||
@@ -245,7 +245,7 @@ public inline fun <T> Iterator<T>.withIndices() : Iterator<Pair<Int, T>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <T, R: Comparable<R>> Iterator<T>.sortBy(f: (T) -> R) : List<T> {
|
||||
val sortedList = toCollection(ArrayList<T>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun LongArray.withIndices() : Iterator<Pair<Int, Long>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> LongArray.sortBy(f: (Long) -> R) : List<Long> {
|
||||
val sortedList = toCollection(ArrayList<Long>())
|
||||
|
||||
@@ -333,7 +333,7 @@ public inline fun ShortArray.withIndices() : Iterator<Pair<Int, Short>> {
|
||||
|
||||
/**
|
||||
* Copies all elements into a [[List]] and sorts it by value of compare_function(element)
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it._2}) returns list sorted by second element of tuple
|
||||
* E.g. arrayList("two" to 2, "one" to 1).sortBy({it.second}) returns list sorted by second element of pair
|
||||
*/
|
||||
public inline fun <R: Comparable<R>> ShortArray.sortBy(f: (Short) -> R) : List<Short> {
|
||||
val sortedList = toCollection(ArrayList<Short>())
|
||||
|
||||
@@ -46,10 +46,10 @@ deprecated("Use sortedSetOf(...) instead")
|
||||
public fun sortedSet<T>(comparator: Comparator<T>, vararg values: T) : TreeSet<T> = sortedSetOf(comparator, *values)
|
||||
|
||||
/**
|
||||
* Returns a new [[HashMap]] populated with the given tuple values where the first value in each tuple
|
||||
* Returns a new [[HashMap]] populated with the given pairs where the first value in each pair
|
||||
* is the key and the second value is the value
|
||||
*
|
||||
* @includeFunctionBody ../../test/MapTest.kt createUsingTuples
|
||||
* @includeFunctionBody ../../test/MapTest.kt createUsingPairs
|
||||
*/
|
||||
public fun <K,V> hashMapOf(vararg values: Pair<K,V>): HashMap<K,V> {
|
||||
val answer = HashMap<K,V>(values.size)
|
||||
@@ -67,7 +67,7 @@ deprecated("Use mapOf(...) or hashMapOf(...) instead")
|
||||
public fun <K,V> hashMap(vararg values: Pair<K,V>): HashMap<K,V> = hashMapOf(*values)
|
||||
|
||||
/**
|
||||
* Returns a new [[SortedMap]] populated with the given tuple values where the first value in each tuple
|
||||
* Returns a new [[SortedMap]] populated with the given pairs where the first value in each pair
|
||||
* is the key and the second value is the value
|
||||
*
|
||||
* @includeFunctionBody ../../test/MapTest.kt createSortedMap
|
||||
@@ -88,7 +88,7 @@ deprecated("Use sortedMapOf(...) instead")
|
||||
public fun <K,V> sortedMap(vararg values: Pair<K, V>): SortedMap<K,V> = sortedMapOf(*values)
|
||||
|
||||
/**
|
||||
* Returns a new [[LinkedHashMap]] populated with the given tuple values where the first value in each tuple
|
||||
* Returns a new [[LinkedHashMap]] populated with the given pairs where the first value in each pair
|
||||
* is the key and the second value is the value. This map preserves insertion order so iterating through
|
||||
* the map's entries will be in the same order
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user