← Docs
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.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .