BitSet32

value class BitSet32 : Set<Int> (source)

Immutable Set implementation that can store values in range 0..31.

To create an instance of this class, see BitSet32.of, BitSet32.full and BitSet32.empty.

Instances of this class have the following particularities:

  • Operations on a single element execute in O(1).

  • Memory usage is O(1): exactly 32 bits when unboxed.

See also

Mutable alternative.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val size: Int

Functions

Link copied to clipboard
open operator override fun contains(element: Int): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<Int>): Boolean
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<Int>
Link copied to clipboard
open override fun toString(): String