Rollback 0514ddc719 due to failing tests

This commit is contained in:
Maxim Shafirov
2013-05-31 11:35:11 +04:00
parent 58914cdf33
commit 868bf90de2
2 changed files with 1 additions and 11 deletions
@@ -75,13 +75,3 @@ public inline fun <T> Iterable<T>.sort(comparator: java.util.Comparator<T>) : Li
java.util.Collections.sort(list, comparator)
return list
}
public inline fun <T> Iterable<T>.sort(compare: (T, T) -> Int): List<T> {
return sort(
object : java.util.Comparator<T> {
public override fun compare(o1: T, o2: T): Int {
return compare.invoke(o1, o2)
}
}
)
}
+1 -1
View File
@@ -27,7 +27,7 @@ public inline fun <T> Collection<T>?.orEmpty() : Collection<T>
/** TODO these functions don't work when they generate the Array<T> versions when they are in JLIterables */
public inline fun <T: Comparable<T>> Iterable<T>.toSortedList() : List<T> = toCollection(ArrayList<T>()).sort()
public inline fun <T> Iterable<T>.toSortedList(compare: (T, T) -> Int) : List<T> = toList().sort(compare)
public inline fun <T: Comparable<T>> Iterable<T>.toSortedList(comparator: java.util.Comparator<T>) : List<T> = toList().sort(comparator)
// List APIs