added java.lang.Comparable to JavaTypeTransformer
This commit is contained in:
@@ -109,7 +109,7 @@ public fun <T> java.lang.Iterable<T>.withIndices(): java.util.List<#(Int, T)> {
|
||||
return answer
|
||||
}
|
||||
|
||||
public inline fun <in T: java.lang.Comparable<T>> java.lang.Iterable<T>.sort() : List<T> {
|
||||
public inline fun <in T: Comparable<T>> java.lang.Iterable<T>.sort() : List<T> {
|
||||
val list = toList()
|
||||
java.util.Collections.sort(list)
|
||||
return list
|
||||
|
||||
@@ -33,9 +33,9 @@ public inline fun <T> java.util.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 <in T: java.lang.Comparable<T>> java.lang.Iterable<T>.toSortedList() : List<T> = toList().sort()
|
||||
public inline fun <in T: Comparable<T>> java.lang.Iterable<T>.toSortedList() : List<T> = toList().sort()
|
||||
|
||||
public inline fun <in T: java.lang.Comparable<T>> java.lang.Iterable<T>.toSortedList(comparator: java.util.Comparator<T>) : List<T> = toList().sort(comparator)
|
||||
public inline fun <in T: Comparable<T>> java.lang.Iterable<T>.toSortedList(comparator: java.util.Comparator<T>) : List<T> = toList().sort(comparator)
|
||||
|
||||
|
||||
// List APIs
|
||||
|
||||
Reference in New Issue
Block a user