BooleanMap
Description
Initializes the boolean map with a default value or factory (defaults to false).
Methods
destroy
booleanMap.destroy()
Destroys the map instance.
getLength
booleanMap.getLength() ⇒ number
Get the number of indexes.
getValueAtIndex
booleanMap.getValueAtIndex(index) ⇒ T | undefined
Get the boolean value at a physical index.
| Param | Type | Description |
|---|---|---|
| index | number | Physical index. |
getValues
booleanMap.getValues() ⇒ Array<boolean>
Get the full list of boolean values. Returns the materialized array by reference (no per-call copy).
setValueAtIndex
booleanMap.setValueAtIndex(index, value) ⇒ boolean
Set the boolean value at a single physical index. Materializes the store on the first non-default write.
| Param | Type | Description |
|---|---|---|
| index | number | Physical index. |
| value | * | The value to set (coerced to boolean). |
setValues
booleanMap.setValues(values)
Set new boolean values. Keeps the compact representation when all values equal the default.
| Param | Type | Description |
|---|---|---|
| values | Array | List of boolean values. |