Class BitArray
Index
Constructors
constructor
-
Creates a new bit array with a fixed size.
Parameters
- size: number
The number of bits to store.
Returns BitArray
- size: number
Methods
get
-
Gets the current value at the specified index.
Parameters
- bitIndex: number
The index to get the value from.
Returns boolean
The value at the specified index.
- bitIndex: number
set
-
Sets the value at the specified index.
Parameters
- bitIndex: number
The index to set the value at.
- value: boolean
The value to set.
Returns void
- bitIndex: number
An fixed size array that effectively stores boolean values where each value is a single bit of backing data.
Remarks
All bits are initialized to false.