public abstract class AbstractUuidCreator extends Object
UUID objects.| Modifier and Type | Field and Description |
|---|---|
static UUID |
NAMESPACE_DNS |
static UUID |
NAMESPACE_OID |
static UUID |
NAMESPACE_URL |
static UUID |
NAMESPACE_X500 |
static UUID |
NIL_UUID |
static long |
RFC4122_VARIANT_BITS |
static long[] |
RFC4122_VERSION_BITS |
static int |
VARIANT_RESERVED_FUTURE |
static int |
VARIANT_RESERVED_MICROSOFT |
static int |
VARIANT_RESERVED_NCS |
static int |
VARIANT_RFC4122 |
protected int |
version |
static int |
VERSION_0 |
static int |
VERSION_1 |
static int |
VERSION_2 |
static int |
VERSION_3 |
static int |
VERSION_4 |
static int |
VERSION_5 |
| Constructor and Description |
|---|
AbstractUuidCreator(int version) |
| Modifier and Type | Method and Description |
|---|---|
protected long |
getVariantBits(long lsb)
Returns the variant bits from the "Least Significant Bits".
|
int |
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 to been created is valid. |
protected final int version
public static final int VARIANT_RESERVED_NCS
public static final int VARIANT_RFC4122
public static final int VARIANT_RESERVED_MICROSOFT
public static final int VARIANT_RESERVED_FUTURE
public static final int VERSION_0
public static final int VERSION_1
public static final int VERSION_2
public static final int VERSION_3
public static final int VERSION_4
public static final int VERSION_5
public static final UUID NIL_UUID
public static final UUID NAMESPACE_DNS
public static final UUID NAMESPACE_URL
public static final UUID NAMESPACE_OID
public static final UUID NAMESPACE_X500
public static final long RFC4122_VARIANT_BITS
public static final long[] RFC4122_VERSION_BITS
public int getVersion()
public boolean valid(long msb,
long lsb)
UUID to been created 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.