public abstract class AbstractUuidCreator extends Object
UUID objects.| Modifier and Type | Field and Description |
|---|---|
static UUID |
NIL_UUID |
static long |
RFC4122_VARIANT_BITS |
protected static long[] |
RFC4122_VERSION_BITS |
protected UuidVersion |
version |
| Constructor and Description |
|---|
AbstractUuidCreator(UuidVersion version) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
getVariantBits(long lsb)
Returns the variant bits from the "Least Significant Bits".
|
UuidVersion |
getVersion() |
protected long |
getVersionBits(long msb)
Returns the version bits from the "Most Significant Bits".
|
protected long |
setVariantBits(long lsb)
Set UUID variant bits into the "Least Significant Bits".
|
protected long |
setVersionBits(long msb)
Set UUID version bits into the "Most Significant Bits".
|
boolean |
valid(long msb,
long lsb)
Check if the
UUID is valid. |
protected final UuidVersion version
public static final UUID NIL_UUID
public static final long RFC4122_VARIANT_BITS
protected static final long[] RFC4122_VERSION_BITS
public AbstractUuidCreator(UuidVersion version)
public UuidVersion getVersion()
public boolean valid(long msb,
long lsb)
UUID is valid.
It checks whether the variant and version are correct.msb - the MSBlsb - the LSBprotected long getVariantBits(long lsb)
lsb - the LSBprotected long setVariantBits(long lsb)
lsb - the LSBprotected long getVersionBits(long msb)
msb - the MSBprotected long setVersionBits(long msb)
msb - the MSBCopyright © 2019. All rights reserved.