UInt48

value class UInt48(val value: ULong) : Comparable<UInt48>

A 48-bit representation of an (unsigned) Integer

Constructors

Link copied to clipboard
constructor(value: ULong)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

the ULong value this Integer represents. Must be between UInt48.MIN_VALUE and UInt48.MAX_VALUE

Functions

Link copied to clipboard
infix fun UInt48.and(other: UInt48): UInt48
Link copied to clipboard
open operator override fun compareTo(other: UInt48): Int
Link copied to clipboard
fun UInt48.copyIntoByteArray(array: ByteArray, offset: Int = 0, byteOrder: ByteOrder): ByteArray

Encodes this UInt48 and copies it into a ByteArray at a given offset.

Link copied to clipboard
operator fun div(other: UInt48): UInt48
Link copied to clipboard

Checks whether the bit at index is set in this UInt48

Link copied to clipboard
operator fun minus(other: UInt48): UInt48
Link copied to clipboard
infix fun UInt48.or(other: UInt48): UInt48
Link copied to clipboard
operator fun plus(other: UInt48): UInt48
Link copied to clipboard
fun UInt48.setBit(index: Number): UInt48

Creates a UInt48 that is equal to this UInt48 except the bit at index is set

Link copied to clipboard
infix fun UInt48.shl(bitCount: Int): UInt48
Link copied to clipboard
infix fun UInt48.shr(bitCount: Int): UInt48
Link copied to clipboard
operator fun times(other: UInt48): UInt48
Link copied to clipboard

Encodes this UInt48 into a ByteArray.

Link copied to clipboard

Converts this UInt48 value to Int48. If this value is positive, the resulting Int48 value represents the same numerical value as this UInt48. The resulting Int48 value has the same binary representation as this UInt48 value.