new BitSetJava()
Java library bitset implementation.
- Implements:
- Source:
Methods
count() → (non-null) {number}
Returns the number of true values in the bitset.
- Implements:
- Source:
Returns:
The number of true values in the bitset
- Type
- number
get(bitnon-null) → (non-null) {boolean}
Gets the bit at the specified index.
Parameters:
| Name | Type | Description |
|---|---|---|
bit |
number | The index of the bit to get |
- Implements:
- Source:
Returns:
Whether the bit is currently true or false
- Type
- boolean
set(bitnon-null, stateopt) → (non-null) {boolean}
Sets the specified bit to true or false.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
bit |
number | The index of the bit to set | |
state |
boolean |
<optional> |
Whether to set the bit to true or false |
- Implements:
- Source:
Returns:
Returns the state parameter for chaining purposes
- Type
- boolean