fromString

fun <T> fromString(uuidAsString: String): Uid<T>

Instantiates a Uid from uuidAsString, an existing String representation of a UUID. Mainly used when de-serializing existing entities.

The format of uuidAsString is checked to comply with the standard UUID format, which is:

  • Dashes at positions: 8, 13, 18, 23 (base 0).

  • Characters 0-9 and a-f (lowercase only).

If this format is used, the creation of the Uid is very fast. If an alternative format us used, as accepted by fromString, the call is much more expensive.

Throws

When uuidAsString does not conform to the string representation as described in UUID.toString.