Class LCG64ShiftRandom.ThreadLocal

  • Enclosing class:
    LCG64ShiftRandom

    public static final class LCG64ShiftRandom.ThreadLocal
    extends ThreadLocal<LCG64ShiftRandom>
    This class represents a thread local implementation of the LCG64ShiftRandom PRNG. It's recommended to initialize the RandomRegistry the following way:
    // Register the PRNG with the default parameters. RandomRegistry.setRandom(new LCG64ShiftRandom.ThreadLocal()); // Register the PRNG with the {@code LECUYER3} parameters. RandomRegistry.setRandom(new LCG64ShiftRandom.ThreadLocal( LCG64ShiftRandom.LECUYER3 ));
    Be aware, that calls of the setSeed(long) method will throw an UnsupportedOperationException for thread local instances.
    RandomRegistry.setRandom(new LCG64ShiftRandom.ThreadLocal()); // Will throw 'UnsupportedOperationException'. RandomRegistry.getRandom().setSeed(1234);
    Since:
    1.1
    Version:
    3.0