kmongo / kotlin.collections / com.mongodb.client.MongoIterable / toSortedSet

toSortedSet

fun <T : Comparable<T>> MongoIterable<T>.toSortedSet(): SortedSet<T> (source)

Returns a SortedSet of all elements.

fun <T> MongoIterable<T>.toSortedSet(comparator: <ERROR CLASS><in T>): SortedSet<T> (source)

Returns a SortedSet of all elements.

Elements in the set returned are sorted according to the given comparator.