|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.pushtotest.tool.util.RandomIntGenerator
public class RandomIntGenerator
Generates more random numbers than those generated by java.lang.Math.random() This class was originally written in Core Java 2, Volume 1 Fundamentals by Cay Horstmann and Garay Cornell, published by Prentice Hall, Pages 147-149 Core Java 2 credits the algorithm to: Donald E. Knuth's Semi-Numerical Algorithms, which is Volume 2 of his Art of Computer Programming [Addison-Wesley, 1981] book.
| Constructor Summary | |
|---|---|
RandomIntGenerator(int l,
int h)
Constructs the class that encapsulates the random integer generator |
|
| Method Summary | |
|---|---|
int |
draw()
Returns an int containing a random integer in the range constructed |
java.lang.String |
drawString()
Returns a String containing a random integer in the range constructed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RandomIntGenerator(int l,
int h)
1 - the lowest integer in the rangeh - the highest integer in the range| Method Detail |
|---|
public java.lang.String drawString()
public int draw()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||