UUIDValue

value class UUIDValue : UUID

UUID Value

Typed representation of a UUID. Under the hood, UUIDs are treated as quasi-strings, much like URLs are. This class holds the implementation details for a wrapped or generated UUID, and behaves as a string from a guest perspective. Parsing and encoding happen at construction time; UUIDValue objects never exist in an invalid state.

Generating a UUID uses an optimized internal structure, which is only serialized to a string on-demand. If a UUID is generated and never converted to a string, no string encoding occurs.

If a string happens to be available (for instance, when a UUID is constructed from a string), it is cached after parsing occurs.

Types

Link copied to clipboard

Internal factory implementation which handles the generation and parsing of UUIDs; these are always returned as an instance of UUIDValue.

Properties

Link copied to clipboard
open override val asString: String

Return the string representation of this UUID.

Link copied to clipboard
open override val length: Int

Functions

Link copied to clipboard
open operator override fun get(index: Int): Char
Link copied to clipboard
open override fun subSequence(startIndex: Int, endIndex: Int): CharSequence
Link copied to clipboard
open override fun toString(): String