get

operator fun get(bitIndex: Int): Boolean

Returns the value of the bit with the specified index. The value is true if the bit with the index bitIndex is currently set in this BitSet; otherwise, the result is false.

Return

the value of the bit with the specified index

Parameters

bitIndex

the bit index

Throws

if the specified index is negative


fun get(fromIndex: Int, toIndex: Int): BitSet

Returns a new BitSet composed of bits from this BitSet from fromIndex (inclusive) to toIndex (exclusive).

Return

a new BitSet from a range of this BitSet

Since

1.4

Parameters

fromIndex

index of the first bit to include

toIndex

index after the last bit to include

Throws

if fromIndex is negative, or toIndex is negative, or fromIndex is larger than toIndex