Class UlidStruct
- java.lang.Object
-
- com.github.f4b6a3.ulid.util.internal.UlidStruct
-
public final class UlidStruct extends Object
This class represents the structure of a ULID. It is for internal use and test cases in this library.
-
-
Field Summary
Fields Modifier and Type Field Description static char[]BASE32_CHARSstatic long[]BASE32_VALUESprotected static longHALF_RANDOM_COMPONENTlongrandom1longrandom2longtimeprotected static longTIMESTAMP_COMPONENT
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)inthashCode()static UlidStructof(long time, long random1, long random2)static UlidStructof(String ulid)static UlidStructof(UUID ulid)StringtoString()StringtoString4()UUIDtoUuid()UUIDtoUuid4()
-
-
-
Field Detail
-
time
public final long time
-
random1
public final long random1
-
random2
public final long random2
-
TIMESTAMP_COMPONENT
protected static final long TIMESTAMP_COMPONENT
- See Also:
- Constant Field Values
-
HALF_RANDOM_COMPONENT
protected static final long HALF_RANDOM_COMPONENT
- See Also:
- Constant Field Values
-
BASE32_CHARS
public static final char[] BASE32_CHARS
-
BASE32_VALUES
public static final long[] BASE32_VALUES
-
-
Method Detail
-
of
public static UlidStruct of(long time, long random1, long random2)
-
of
public static UlidStruct of(UUID ulid)
-
of
public static UlidStruct of(String ulid)
-
toString4
public String toString4()
-
toUuid
public UUID toUuid()
-
toUuid4
public UUID toUuid4()
-
-