| Modifier and Type | Field and Description |
|---|---|
static DotNetGuid1Codec |
INSTANCE
A shared immutable instance.
|
| Constructor and Description |
|---|
DotNetGuid1Codec() |
| Modifier and Type | Method and Description |
|---|---|
UUID |
decode(UUID uuid)
Get a time-based UUID (v4) from a .Net Guid.
|
UUID |
encode(UUID uuid)
Get a .Ned Guid from a time-based UUID (v1).
|
protected static UUID |
toAndFromDotNetGuid(UUID uuid)
Convert a UUID to and from a .Net Guid.
|
public static final DotNetGuid1Codec INSTANCE
public UUID encode(UUID uuid)
This codec converts a time-based UUID (v1) to a .Net Guid.
It rearranges the most significant bytes from big-endian to little-endian, and vice-versa.
The .Net Guid stores the most significant bytes as little-endian, while the least significant bytes are stored as big-endian (network order).
encode in interface UuidCodec<UUID>uuid - a UUIDInvalidUuidException - if the argument is invalidpublic UUID decode(UUID uuid)
It rearranges the most significant bytes from big-endian to little-endian, and vice-versa.
The .Net Guid stores the most significant bytes as little-endian, while the least significant bytes are stored as big-endian (network order).
decode in interface UuidCodec<UUID>uuid - a UUIDInvalidUuidException - if the argument is invalidprotected static UUID toAndFromDotNetGuid(UUID uuid)
It rearranges the most significant bytes from big-endian to little-endian, and vice-versa.
The .Net Guid stores the most significant bytes as little-endian, while the least significant bytes are stored as big-endian (network order).
uuid - a UUIDCopyright © 2024. All rights reserved.