Skip to content
Fabio Lima edited this page Aug 31, 2022 · 28 revisions

UUID Creator

This library was designed to be easy to use. The only things you have to know are what a UUID is and what type you need.

If you just want a random UUID, which is the most common case, use this single line of code:

UUID uuid = UuidCreator.getRandomBased();

Or if you want a UUID that is based on creation time, use this line of code:

UUID uuid = UuidCreator.getTimeBased();

Or if you want a UUID that is ordered by creation time, use this line:

UUID uuid = UuidCreator.getTimeOrdered();

All UUID types can be generated from the facade UuidCreator.

Recommended readings

Clone this wiki locally