checkSize

fun <Z> Collection<Z>.checkSize(count: IntRange): Collection<Z>

Ensure a collection has a fixed number of elements.

Receiver

Collection which size will be checked.

Return

Receiver reference (to allow call chaining).

Parameters

count

Required number of elements.