kotlin-stdlib / kotlin.collections / toSortedSet toSortedSet JVM 1.0 fun <T : Comparable<T>> Array<out T>.toSortedSet(): SortedSet<T>(source) fun ByteArray.toSortedSet(): SortedSet<Byte>(source) fun ShortArray.toSortedSet(): SortedSet<Short>(source) fun IntArray.toSortedSet(): SortedSet<Int>(source) fun LongArray.toSortedSet(): SortedSet<Long>(source) fun FloatArray.toSortedSet(): SortedSet<Float>(source) fun DoubleArray.toSortedSet(): SortedSet<Double>(source) fun BooleanArray.toSortedSet(): SortedSet<Boolean>(source) fun CharArray.toSortedSet(): SortedSet<Char>(source) fun <T : Comparable<T>> Iterable<T>.toSortedSet(): SortedSet<T>(source) Returns a new SortedSet of all elements. JVM 1.0 fun <T> Array<out T>.toSortedSet( comparator: Comparator<in T>): SortedSet<T>(source) fun <T> Iterable<T>.toSortedSet( comparator: Comparator<in T>): SortedSet<T>(source) Returns a new SortedSet of all elements. Elements in the set returned are sorted according to the given comparator.