public final class JDKRandomBridge extends java.util.Random
RestorableUniformRandomProviderinstance but will otherwise rely on the base class for generating all the random types.
Legacy applications coded against the JDK's API could use this subclass
Random in order to replace its linear congruential generator
Creates a new instance.
|Modifier and Type||Method||Description|
Delegates the generation of 32 random bits to the
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public void setSeed(long seed)
protected int next(int n)
RandomSourceargument provided at
construction. The returned value is such that if the source of randomness is
RandomSource.JDK, all the generated values will be identical to those produced by the same sequence of calls on a
Randominstance initialized with the same seed.
n- Number of random bits which the requested value must contain.
nhigh-order bits of a pseudo-random 32-bits integer.
Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.