Class DevRandom

java.lang.Object
java.util.Random
net.sf.colossus.util.DevRandom
All Implemented Interfaces:
Serializable, RandomGenerator

public class DevRandom extends Random
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:
  • Field Details

  • Constructor Details

    • DevRandom

      public DevRandom()
    • DevRandom

      public DevRandom(String sourcename)
  • Method Details

    • getRandomSourceFromProperties

      private String getRandomSourceFromProperties()
    • tryOneSource

      private boolean tryOneSource(String src)
    • init

      private void init()
    • next

      protected int next(int bits)
      Overrides:
      next in class Random