|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.sun.faban.driver.util.Random
public class Random
RandNum is a random number/value generator. This is a primitive facility for RandomValues. RandomValues and all subclasses generate application-specific random values.
Constructor Summary | |
---|---|
Random()
Constructs the random value generator. |
|
Random(long seed)
Constructs the random value generators with a seed. |
Method Summary | |
---|---|
double |
drandom(double x,
double y)
Selects a double random number uniformly distributed between x and y, inclusively, with a mean of (x+y)/2. |
long |
lrandom(long x,
long y)
Selects a long random number uniformly distributed between x and y, inclusively, with a mean of (x+y)/2. |
String |
makeAString(int x,
int y)
makeAString [x..y] generates a random string of alphanumeric characters of random lengthof mininum x, maximum y and mean (x+y)/2 |
Calendar |
makeCalendarInInterval(Calendar min,
Calendar max)
Creates a random calendar between Calendar min and max. |
Calendar |
makeCalendarInInterval(Calendar ref,
int min,
int max,
int units)
Creates a random calendar between time ref + min and ref + max. |
String |
makeCString(int x,
int y)
makeCString [x..y] generates a random string of only alpahabet characters of random length of mininum x, maximum y and mean (x+y)/2 |
Date |
makeDateInInterval(Date inDate,
int x,
int y)
makeDateInInterval generates a java.sql.Date instance representing a Date within the range specified by (input Date + x) and (inputDate + y) |
String |
makeNString(int x,
int y)
makeNString [x..y] generates a random string of only numeric characters of random length of mininum x, maximum y and mean (x+y)/2. |
int |
NURand(int A,
int x,
int y)
NURand integer non-uniform random number generator. |
int |
random(int x,
int y)
Selects a random number uniformly distributed between x and y, inclusively, with a mean of (x+y)/2. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Random()
public Random(long seed)
seed
- The seed for the random value generatorMethod Detail |
---|
public int random(int x, int y)
x
- the x valuey
- the y value
public long lrandom(long x, long y)
x
- the x valuey
- the y value
public double drandom(double x, double y)
x
- the x valuey
- the y value
public int NURand(int A, int x, int y)
A
- the A valuex
- the x valuey
- the y value
public String makeAString(int x, int y)
x
- the minimum lengthy
- the maximum length
public String makeCString(int x, int y)
x
- the minimum lengthy
- the maximum length
public Date makeDateInInterval(Date inDate, int x, int y)
inDate
- the reference datex
- minimum offset from the reference datey
- maximum offset from the reference date
public Calendar makeCalendarInInterval(Calendar ref, int min, int max, int units)
ref
- The reference calendarmin
- The lower time offset from refmax
- The upper time offset from refunits
- The units of min and max, referencing the
fields of Calendar, e.g. Calendar.YEAR
public Calendar makeCalendarInInterval(Calendar min, Calendar max)
min
- The minimum timemax
- The maximum time
public String makeNString(int x, int y)
x
- the minimum lengthy
- the maximum length
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |