Replace deprecated reverse method usages.

This commit is contained in:
Ilya Gorbunov
2015-08-26 19:59:25 +03:00
parent ca798d8d71
commit 84d3d42e05
4 changed files with 10 additions and 10 deletions
+7 -7
View File
@@ -548,49 +548,49 @@ public fun <T : Comparable<T>> Array<out T>.sortedDescending(): List<T> {
* Returns a list of all elements sorted descending according to their natural sort order.
*/
public fun ByteArray.sortedDescending(): List<Byte> {
return copyOf().apply { sort() }.reverse()
return copyOf().apply { sort() }.reversed()
}
/**
* Returns a list of all elements sorted descending according to their natural sort order.
*/
public fun CharArray.sortedDescending(): List<Char> {
return copyOf().apply { sort() }.reverse()
return copyOf().apply { sort() }.reversed()
}
/**
* Returns a list of all elements sorted descending according to their natural sort order.
*/
public fun DoubleArray.sortedDescending(): List<Double> {
return copyOf().apply { sort() }.reverse()
return copyOf().apply { sort() }.reversed()
}
/**
* Returns a list of all elements sorted descending according to their natural sort order.
*/
public fun FloatArray.sortedDescending(): List<Float> {
return copyOf().apply { sort() }.reverse()
return copyOf().apply { sort() }.reversed()
}
/**
* Returns a list of all elements sorted descending according to their natural sort order.
*/
public fun IntArray.sortedDescending(): List<Int> {
return copyOf().apply { sort() }.reverse()
return copyOf().apply { sort() }.reversed()
}
/**
* Returns a list of all elements sorted descending according to their natural sort order.
*/
public fun LongArray.sortedDescending(): List<Long> {
return copyOf().apply { sort() }.reverse()
return copyOf().apply { sort() }.reversed()
}
/**
* Returns a list of all elements sorted descending according to their natural sort order.
*/
public fun ShortArray.sortedDescending(): List<Short> {
return copyOf().apply { sort() }.reverse()
return copyOf().apply { sort() }.reversed()
}
/**