fill

fun fill(element: Boolean, fromIndex: Int = 0, toIndex: Int = size)(source)

Fills the specified range of this BitArray with the given boolean value.

Parameters

element

The boolean value to fill the range with.

fromIndex

Inclusive start index of the range to fill (default 0).

toIndex

Exclusive end index of the range to fill (default size).

Throws

if fromIndex or toIndex - 1 are out of bounds.