Now it is easy to use RandomGenerator (JDK17) and SplittableRandom (JDK8).
Example:
// use a random function that returns an int value
RandomGenerator random = RandomGenerator.getDefault();
TsidFactory factory = TsidFactory.builder().withRandomFunction(() -> random.nextInt()).build();
Now it is easy to use
RandomGenerator
(JDK17) andSplittableRandom
(JDK8).Example: