KtCollectionExtensions<T> extension

on

Methods

isNotEmpty() bool

Available on KtCollection<T>, provided by the KtCollectionExtensions extension

Returns true if the collection is not empty.
random([Random? random]) → T

Available on KtCollection<T>, provided by the KtCollectionExtensions extension

Returns a random element from this collection.
randomOrNull([Random? random]) → T?

Available on KtCollection<T>, provided by the KtCollectionExtensions extension

Returns a random element from this collection.
toMutableList() KtMutableList<T>

Available on KtCollection<T>, provided by the KtCollectionExtensions extension

Returns a KtMutableList filled with all elements of this collection.