BoolArray
@Js
class BoolArray : Obj
Optimized fixed size array of booleans packed into words of 32-bits. The array values default to false.
Create a array of given size
Set the boolean at the given index
Get number of booleans in the array
Get the boolean at the given index
Set entire array to false
Iterate each index set to true
Set the value at given index and return the previous value
Fill this array with the given boolean value
Copy the booleans from that array into this array and return this
This clear()
Set entire array to false
This copyFrom(BoolArray that)
Copy the booleans from that array into this array and return this.
Void eachTrue(|Int| f)
Iterate each index set to true
This fill(Bool val, Range? range)
Fill this array with the given boolean value. If range is null then the entire array is filled, otherwise just the specified range. Return this.
@Operator
Bool get(Int index)
Get the boolean at the given index. Negative indices are not supported.
Bool getAndSet(Int index, Bool val)
Set the value at given index and return the previous value.
static new make(Int size)
Create a array of given size
@Operator
Void set(Int index, Bool val)
Set the boolean at the given index. Negative indices are not supported.
Int size()
Get number of booleans in the array