BitArray

public final class BitArray

The BitArray class represents an array of booleans. It stores them packed inside regular integers to not waste the overhead of storing booleans.

Constructors

Link copied to clipboard
public BitArray BitArray(Integer size)

Functions

Link copied to clipboard
public final Boolean get(Integer idx)

Retrieve the value at position idx.

Link copied to clipboard
public final IntRange getIndices()
Link copied to clipboard
public final Integer getSize()

The size of the array

Link copied to clipboard
public final Unit set(Integer idx, Boolean value)

Sets the value at position idx.

Properties

Link copied to clipboard
private final IntRange indices

The range of indices of the array.

Link copied to clipboard
private final Integer size

The size of the array