Package net.sf.colossus.util
Class DevRandom
java.lang.Object
java.util.Random
net.sf.colossus.util.DevRandom
- All Implemented Interfaces:
Serializable
,RandomGenerator
Class DevRandom generates random bits (same interface as class Random).
Which random data source to use can be specified by providing a
property called "net.sf.colossus.randomFile" (see randomPropertyName)
or as argument to the constructor.
If no special source is specified or the specified source is unreachable
then it falls back on the regular java Random class.
- Author:
- Romain Dolbeau, David Ripton
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
RandomGenerator.ArbitrarilyJumpableGenerator, RandomGenerator.JumpableGenerator, RandomGenerator.LeapableGenerator, RandomGenerator.SplittableGenerator, RandomGenerator.StreamableGenerator
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate String
private void
init()
protected int
next
(int bits) private boolean
tryOneSource
(String src) Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.random.RandomGenerator
isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextInt, nextLong, nextLong
-
Field Details
-
LOGGER
-
PRNG
- See Also:
-
source
-
randomSource
-
randStream
-
randomPropertyName
- See Also:
-
randomPropertySource
-
-
Constructor Details
-
DevRandom
public DevRandom() -
DevRandom
-
-
Method Details