Add the Jitpack repository to your build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Release artifact
<dependency>
<groupId>com.github.zrdj</groupId>
<artifactId>java-identifiers</artifactId>
<version>0.1.0</version>
</dependency>
Use the static methods of Identifiers.*
to create your desired IDs of UUID's, Ulid's, Tsid's or Ksuid's and convert
them from or into a String using the methods of Codecs.*
for choosing the desired codec.
public static void main(String[] args) {
final UUID id = Identifiers.UUIDv7();
final Codec<UUID> base32 = Codecs.UUIDBase32();
System.out.println("id as base32: " + base32.encode(id));
}