Package org.smallmind.nutsnbolts.util
Class SnowflakeId
- java.lang.Object
-
- org.smallmind.nutsnbolts.util.SnowflakeId
-
- All Implemented Interfaces:
Comparable<SnowflakeId>
public class SnowflakeId extends Object implements Comparable<SnowflakeId>
-
-
Constructor Summary
Constructors Constructor Description SnowflakeId()SnowflakeId(byte[] uniqueArray)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]asByteArray()static intbyteSize()intcompareTo(SnowflakeId snowflakeId)booleanequals(Object obj)BigIntegergenerateBigInteger()StringgenerateCompactString()StringgenerateDottedString()StringgenerateHexEncoding()inthashCode()static SnowflakeIdnewInstance()
-
-
-
Method Detail
-
byteSize
public static int byteSize()
-
newInstance
public static SnowflakeId newInstance()
-
asByteArray
public byte[] asByteArray()
-
generateBigInteger
public BigInteger generateBigInteger()
-
generateHexEncoding
public String generateHexEncoding()
-
generateCompactString
public String generateCompactString()
-
generateDottedString
public String generateDottedString()
-
compareTo
public int compareTo(SnowflakeId snowflakeId)
- Specified by:
compareToin interfaceComparable<SnowflakeId>
-
-