Uuid constructor
Creates a UUID from the provided 5 sets of octets.
llllllll-mmmm-hhhh-ssss-nnnnnnnnnnnn
If any provided integer is out of range, an error will be thrown:
l
: unsigned 32-bitsm
: unsigned 16-bitsh
: unsigned 16-bitss
: unsigned 16-bitsn
: unsigned 48-bits
This is intended to be a convenience constructor instead Uuid.parse :
// These UUIDs represent the same value.
Uuid.parse('123e4567-e89b-12d3-a456-426655440000')
Uuid(0x123e4567, 0xe89b, 0x12d3, 0xa456, 0x426655440000)
Implementation
factory Uuid(int l, int m, int h, int s, int n) {
return _Uuid(
RangeError.checkValueInInterval(l, 0x000000000000, 0x0000ffffffff),
RangeError.checkValueInInterval(m, 0x000000000000, 0x00000000ffff),
RangeError.checkValueInInterval(h, 0x000000000000, 0x00000000ffff),
RangeError.checkValueInInterval(s, 0x000000000000, 0x00000000ffff),
RangeError.checkValueInInterval(n, 0x000000000000, 0xffffffffffff),
);
}