toSortedSet
fun <T : Comparable<T>> Array<out T>.toSortedSet(): SortedSet<T>fun ShortArray.toSortedSet(): SortedSet<Short>fun FloatArray.toSortedSet(): SortedSet<Float>fun DoubleArray.toSortedSet(): SortedSet<Double>fun BooleanArray.toSortedSet(): SortedSet<Boolean>fun <T : Comparable<T>> Iterable<T>.toSortedSet(): SortedSet<T>Returns a SortedSet of all elements.
fun <T> Array<out T>.toSortedSet(
comparator: Comparator<in T>
): SortedSet<T>fun <T> Iterable<T>.toSortedSet(
comparator: Comparator<in T>
): SortedSet<T>Returns a SortedSet of all elements.
Elements in the set returned are sorted according to the given comparator.