KtCollectionExtensions<T> extension

on

Methods

isNotEmpty() bool
Returns true if the collection is not empty.
random([Random? random]) → T
Returns a random element from this collection.
randomOrNull([Random? random]) → T?
Returns a random element from this collection.
sumOf<R extends num>(R selector(T)) → R
Returns the sum of all elements in this collection.
toMutableList() KtMutableList<T>
Returns a KtMutableList filled with all elements of this collection.