RElementIfc

Defines sampling of random elements. Implementers must ensure that non-null random elements are sampled.

Inheritors

Properties

Link copied to clipboard
abstract val randomElement: T

Returns an element randomly selected from the list

Functions

Link copied to clipboard
open fun sample(): T

Returns an element randomly selected from the list

open fun sample(size: Int): List<T>

Returns sample of size from the list