kotlin-stdlib / kotlin.collections / sortedSetOf sortedSetOf JVM 1.0 fun <T> sortedSetOf(vararg elements: T): TreeSet<T>(source) Returns a new java.util.SortedSet with the given elements. JVM 1.0 fun <T> sortedSetOf( comparator: Comparator<in T>, vararg elements: T): TreeSet<T>(source) Returns a new java.util.SortedSet with the given comparator and elements.