Class JDKRandom

All Implemented Interfaces:
RandomIntSource, RestorableUniformRandomProvider, UniformRandomProvider

public class JDKRandom extends IntProvider
A provider that uses the Random.nextInt() method of the JDK's Random class as the source of randomness.

Caveat: All the other calls will be redirected to the methods implemented within this library.

The state of this source of randomness is saved and restored through the serialization of the Random instance.

Since:
1.0
  • Field Details

    • delegate

      private Random delegate
      Delegate. Cannot be "final" (to allow serialization).
  • Constructor Details

    • JDKRandom

      public JDKRandom(Long seed)
      Creates an instance with the given seed.
      Parameters:
      seed - Initial seed.
  • Method Details