f4b6a3 / uuid-creator

UUID Creator is a Java library for generating Universally Unique Identifiers.
MIT License
410 stars 44 forks source link

Add support for RandomGenerator in Java 17 #70

Closed fabiolimace closed 2 years ago

fabiolimace commented 2 years ago

Now it is easy to use RandomGenerator (JDK17) and SplittableRandom (JDK8).

Example:

// use a random function that returns a long value
RandomGenerator random = RandomGenerator.getDefault();
RandomBasedFactory factory = new RandomBasedFactory(() -> random.nextLong());
fabiolimace commented 2 years ago

Released v5.1.0.