com.rubecula.util.random
Class Random_Standard

java.lang.Object
  extended by java.util.Random
      extended by org.apache.commons.math.random.RandomAdaptor
          extended by com.rubecula.util.random.Random_Standard
All Implemented Interfaces:
java.io.Serializable, org.apache.commons.math.random.RandomGenerator

public final class Random_Standard
extends org.apache.commons.math.random.RandomAdaptor

This final class is a default implementation of Random which utilizes the JDKRandomGenerator class as its random number generator. There are three constructors for different situations. All of the methods simply delegate to the random number generator.

Author:
Robin Hillyard
See Also:
Serialized Form

Constructor Summary
Random_Standard()
          Secondary constructor for a new Random_Standard, seeded according to current date/time.
Random_Standard(long seed)
          Secondary constructor for a new Random_Standard, seeded by the parameter seed.
Random_Standard(org.apache.commons.math.random.RandomGenerator randomGenerator)
           
 
Method Summary
 
Methods inherited from class org.apache.commons.math.random.RandomAdaptor
createAdaptor, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeed
 
Methods inherited from class java.util.Random
next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Random_Standard

public Random_Standard()
Secondary constructor for a new Random_Standard, seeded according to current date/time.


Random_Standard

public Random_Standard(long seed)
Secondary constructor for a new Random_Standard, seeded by the parameter seed. If you want to turn Random logging on easily for all (or almost all) unit tests and applications, simply replace JDKRandomGenerator here with RandomLogged and ensure that the logging configuration file includes com.rubecula.util.random at debug level.

Parameters:
seed -

Random_Standard

public Random_Standard(org.apache.commons.math.random.RandomGenerator randomGenerator)
Parameters:
randomGenerator -


Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.