object Companion
source · line 68public companion : ValueEncoder<Uuid>, ValueDecoder<Uuid>
- Supertype
ValueEncoder<Uuid> - Supertype
ValueDecoder<Uuid>
Value construction and serialization helpers.
function encode
source · line 72public override fun encode(value: Uuid, encoder: Encoder): Unit
- Overrides
encode
Encodes the value as its canonical text representation.
parameter encoder
source · line 72encoder: Encoder
parameter value
source · line 72value: Uuid
function parse
source · line 105public fun parse(text: String): Uuid
Parses UUID hexadecimal text, with or without the standard hyphens or throws IllegalArgumentException for invalid input.
parameter text
source · line 105text: String
function fromLongs
source · line 90public fun fromLongs(mostSignificantBits: Long, leastSignificantBits: Long): Uuid
Reinterprets two signed Long bit patterns as the high and low UUID halves.
parameter leastSignificantBits
source · line 90leastSignificantBits: Long
parameter mostSignificantBits
source · line 90mostSignificantBits: Long
function decode
source · line 76public override fun decode(decoder: Decoder): Uuid
- Overrides
decode
Reads a string value and validates it using this type's parser.
parameter decoder
source · line 76decoder: Decoder
function parseOrNone
source · line 100public fun parseOrNone(text: String): Uuid?
Parses UUID hexadecimal text, with or without the standard hyphens, returning None for malformed or out-of-range input.
parameter text
source · line 100text: String
property NIL
source · line 82public val NIL: Uuid
get: public read-only
The UUID whose 128 bits are all zero.
function random
source · line 113public fun random(random: Random): Uuid
Creates a version-4 UUID from the supplied random source and sets the version/variant bits. Security depends on that source.
parameter random
source · line 113random: Random
function fromByteArray
source · line 95public fun fromByteArray(bytes: List<Byte>): Uuid
Constructs a UUID from exactly 16 network-order bytes; other sizes throw.
parameter bytes
source · line 95bytes: List<Byte>
property MAX
source · line 86public val MAX: Uuid
get: public read-only
The UUID whose 128 bits are all one.