|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jaulp.random.RandomUtils
public class RandomUtils
Utility class for producing random data.
Constructor Summary | |
---|---|
RandomUtils()
|
Method Summary | ||
---|---|---|
static java.lang.String |
createdRandomName(char[] donatedChars)
Creates a random Name from the donated chararray. |
|
static java.lang.String |
createRandomId()
Creates a random id and returns it. |
|
static java.lang.String |
getInfomailFromWebsite(java.lang.String url)
Gets an infomail address from the given url. |
|
static java.lang.String |
getRandomEmail()
The Method getRandomEmail() gets a random email-address. |
|
static
|
getRandomEntry(java.util.List<T> list)
Returns a random entry from the given List. |
|
static
|
getRandomEntry(java.util.Map<K,V> map)
Returns a random entry from the given map. |
|
static java.lang.String |
getRandomFaxnumber(java.lang.String phonenumber)
Gets a random faxnumber from a phone. |
|
static float |
getRandomFloat(int afterComma,
int beforeComma)
The Method getRandomFloat(int,int) gets an random float. |
|
static java.lang.String |
getRandomHellenicBirthName(java.lang.String lastname)
Returns a random hellenic birthname. |
|
static java.lang.String |
getRandomHellenicCompany()
Gets a random hellenic company. |
|
static java.lang.String |
getRandomHellenicContactPerson()
Gets a random hellenic contact person. |
|
static java.lang.String |
getRandomHellenicFirstName()
Returns a random hellenic firstname. |
|
static java.lang.String |
getRandomHellenicLastName()
Returns a random hellenic lastname. |
|
static java.lang.String |
getRandomHellenicStreet()
Get's a random hellenic streetname. |
|
static java.lang.String[] |
getRandomHellenicZipAndCity()
Get's a random hellenic zip and city. |
|
static int |
getRandomIntBetween(int start,
int end)
Returns a random int between the range from start and end. |
|
static
|
getRandomKey(java.util.Map<K,V> map)
Returns a random key from the given map. |
|
static java.lang.String |
getRandomMobilnumber()
Gets a random mobil number from a mobilphone. |
|
static java.lang.String |
getRandomNumber(int length)
The Method getRandomNumber(int) produces a random Number to the specified length. |
|
static java.lang.String |
getRandomPassword(int length)
The Method getRandomPassword(int) produces a random password. |
|
static java.lang.String |
getRandomPhonenumber()
Gets a random phonenumber. |
|
static java.lang.String |
getRandomWebsite()
Gets a random name for a website. |
|
static boolean |
randomBoolean()
Returns a random boolean. |
|
static char |
randomChar(java.lang.String string)
The Method randomChar(String) selects a random char from the given String. |
|
static int |
randomInt(int range)
The Method randomInt(int) gets an int to the spezified range. |
|
static java.lang.String |
randomString(java.lang.String[] array)
The Method randomString(String []) a random String from the Array For example: The Stringarray test as argument. |
|
static java.lang.String |
randomString(java.lang.String chars,
int length)
The Method randomString(String, int) makes an random String from the given String and to the spezified length. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RandomUtils()
Method Detail |
---|
public static java.lang.String createdRandomName(char[] donatedChars)
donatedChars
- The Characters for the name.
public static java.lang.String createRandomId()
public static java.lang.String getInfomailFromWebsite(java.lang.String url)
url
- The url.
public static java.lang.String getRandomEmail()
public static <T> T getRandomEntry(java.util.List<T> list)
list
- The map.
public static <K,V> java.lang.Object getRandomEntry(java.util.Map<K,V> map)
map
- The map.
public static java.lang.String getRandomFaxnumber(java.lang.String phonenumber)
phonenumber
- The phonenumber.
public static float getRandomFloat(int afterComma, int beforeComma)
afterComma
- How many decimal places after the comma.beforeComma
- How many decimal places before the comma.
public static java.lang.String getRandomHellenicBirthName(java.lang.String lastname)
public static java.lang.String getRandomHellenicCompany()
public static java.lang.String getRandomHellenicContactPerson()
public static java.lang.String getRandomHellenicFirstName()
public static java.lang.String getRandomHellenicLastName()
public static java.lang.String getRandomHellenicStreet()
public static java.lang.String[] getRandomHellenicZipAndCity()
public static int getRandomIntBetween(int start, int end)
start
- The int from where the range starts.end
- The int from where the range ends.
public static <K,V> java.lang.Object getRandomKey(java.util.Map<K,V> map)
map
- The map.
public static java.lang.String getRandomMobilnumber()
public static java.lang.String getRandomNumber(int length)
length
- The length from the random number.
public static java.lang.String getRandomPassword(int length)
length
- The length from the password.
public static java.lang.String getRandomPhonenumber()
public static java.lang.String getRandomWebsite()
public static boolean randomBoolean()
public static char randomChar(java.lang.String string)
string
- The String from who to select the char.
public static int randomInt(int range)
range
- The Range.
public static java.lang.String randomString(java.lang.String chars, int length)
chars
- The String to get the random chars.length
- The length from the random String.
public static java.lang.String randomString(java.lang.String[] array)
array
- The array with the String to be selected.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |