-
public class Ulid
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classUlid.InvalidBufferSizeException
-
Field Summary
Fields Modifier and Type Field Description public static intULID_BYTES
-
Method Summary
Modifier and Type Method Description static Ulidfrom(Array<byte> buffer)Create a new Ulid object from a buffer static Ulidfrom(String ulidString)Create a new Ulid object from a string static UlidrandomUlid()Create a new Ulid with the current timestamp and random bytes Array<byte>toBytes()Get this Ulid as a byte array StringtoULIDString()Get the ULID String representation booleanequals(Object o)inthashCode()-
-
Method Detail
-
from
static Ulid from(Array<byte> buffer)
Create a new Ulid object from a buffer
- Parameters:
buffer- The Ulid buffer, must be 16 bytes
-
from
static Ulid from(String ulidString)
Create a new Ulid object from a string
- Parameters:
ulidString- The encoded Base32 string representation
-
randomUlid
static Ulid randomUlid()
Create a new Ulid with the current timestamp and random bytes
-
toULIDString
String toULIDString()
Get the ULID String representation
-
hashCode
int hashCode()
-
-
-
-