Bitmask

value class Bitmask(value: Int = 0)

Immutable integer-backed set of bit flags.

Constructors

Link copied to clipboard
constructor(value: Int = 0)

Functions

Link copied to clipboard
fun any(flag: Int): Boolean

Returns whether any bit in flag is present.

Link copied to clipboard
operator fun contains(flag: Int): Boolean

Returns whether every bit in flag is present.

Link copied to clipboard

Returns whether no bits are set.

Link copied to clipboard
operator fun minus(flag: Int): Bitmask

Returns a bitmask without flag.

Link copied to clipboard
operator fun plus(flag: Int): Bitmask

Returns a bitmask containing flag.