Package com.github.f4b6a3.uuid.creator
Class AbstractUuidCreator
- java.lang.Object
-
- com.github.f4b6a3.uuid.creator.AbstractUuidCreator
-
- Direct Known Subclasses:
AbstractNameBasedUuidCreator,AbstractRandomBasedUuidCreator,AbstractTimeBasedUuidCreator
public abstract class AbstractUuidCreator extends Object
Abstract class forUUIDcreators.
-
-
Field Summary
Fields Modifier and Type Field Description protected intversionprotected longversionBits
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractUuidCreator()AbstractUuidCreator(int version)AbstractUuidCreator(UuidVersion version)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected longapplyVariantBits(long lsb)Applies UUID variant bits into the "Least Significant Bits".protected longapplyVersionBits(long msb)Applies UUID version bits into the "Most Significant Bits".intgetVersion()Returns the version number for this creator.
-
-
-
Constructor Detail
-
AbstractUuidCreator
protected AbstractUuidCreator()
-
AbstractUuidCreator
public AbstractUuidCreator(int version)
-
AbstractUuidCreator
public AbstractUuidCreator(UuidVersion version)
-
-
Method Detail
-
getVersion
public int getVersion()
Returns the version number for this creator.- Returns:
- the version number
-
applyVersionBits
protected long applyVersionBits(long msb)
Applies UUID version bits into the "Most Significant Bits".- Parameters:
msb- the MSB- Returns:
- the MSB
-
applyVariantBits
protected long applyVariantBits(long lsb)
Applies UUID variant bits into the "Least Significant Bits".- Parameters:
lsb- the LSB- Returns:
- the LSB with the correct variant bits
-
-