All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class cs005.util.BoundedRandom

java.lang.Object
   |
   +----cs005.util.BoundedRandom

public class BoundedRandom
extends Object

Constructor Index

 o BoundedRandom()
The default constructor seeds itself
 o BoundedRandom(long)
Creates a BoundedRandom with the specified seed.

Method Index

 o getRandom(int)
Gets a value between (and including) 0 and max
 o getRandom(int, int)
Gets a value between (and including) min and max
 o seed(long)
Re-seeds the random generator

Constructors

 o BoundedRandom
 public BoundedRandom()
 o BoundedRandom
 public BoundedRandom(long seed)

Methods

 o seed
 public void seed(long seed)
 o getRandom
 public int getRandom(int min,
                      int max)
 o getRandom
 public int getRandom(int max)

All Packages  Class Hierarchy  This Package  Previous  Next  Index