Companion

Since Kotlin

2.0

Properties

Link copied to clipboard

A Comparator that lexically orders uuids.

Since Kotlin 2.0
Link copied to clipboard
val NIL: Uuid

The uuid with all bits set to zero.

Since Kotlin 2.0
Link copied to clipboard
const val SIZE_BITS: Int = 128

The number of bits used to represent an instance of Uuid in a binary form.

Since Kotlin 2.0
Link copied to clipboard
const val SIZE_BYTES: Int = 16

The number of bytes used to represent an instance of Uuid in a binary form.

Since Kotlin 2.0

Functions

Link copied to clipboard
fun fromByteArray(byteArray: ByteArray): Uuid

Creates a uuid from a byte array containing 128 bits split into 16 bytes.

Since Kotlin 2.0
Link copied to clipboard
fun fromLongs(mostSignificantBits: Long, leastSignificantBits: Long): Uuid

Creates a uuid from specified 128 bits split into two 64-bit Longs.

Since Kotlin 2.0
Link copied to clipboard
fun fromULongs(mostSignificantBits: ULong, leastSignificantBits: ULong): Uuid

Creates a uuid from specified 128 bits split into two 64-bit ULongs.

Since Kotlin 2.0
Link copied to clipboard
fun parse(uuidString: String): Uuid

Parses a uuid from the standard string representation as described in Uuid.toString.

Since Kotlin 2.0
Link copied to clipboard
fun parseHex(hexString: String): Uuid

Parses a uuid from the hexadecimal string representation as described in Uuid.toHexString.

Since Kotlin 2.0
Link copied to clipboard
fun random(): Uuid

Generates a new random Uuid instance.

Since Kotlin 2.0