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

toMutableSet

fun <T> MongoIterable<T>.toMutableSet(): MutableSet<T> (source)

Returns a mutable set containing all distinct elements from the given collection.

The returned set preserves the element iteration order of the original collection.