public class RandomGenerator extends Object
Constructor and Description |
---|
RandomGenerator() |
Modifier and Type | Method and Description |
---|---|
static int |
randomInt(int lower,
int upper)
Generate a pseudorandom number using Math.random().
|
static long |
randomLong(long lower,
long upper)
Generate a pseudorandom number using Math.random().
|
static String |
randomString() |
static String |
randomString(int lowerLen,
int upperLen) |
static String[] |
randomStrings(int number) |
static String[] |
randomStrings(int number,
int lowerLen,
int upperLen) |
void |
testRandomInt() |
void |
testRandomLong() |
void |
testRandomString() |
public static String[] randomStrings(int number)
public static String[] randomStrings(int number, int lowerLen, int upperLen)
public static String randomString()
public static String randomString(int lowerLen, int upperLen)
public static int randomInt(int lower, int upper)
lower
- minimum returned random number, inclusiveupper
- maximum returned random number, exclusivepublic static long randomLong(long lower, long upper)
lower
- minimum returned random number, inclusiveupper
- maximum returned random number, exclusivepublic void testRandomInt()
public void testRandomLong()
public void testRandomString()
Copyright © 2012-2013. All Rights Reserved.