|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.util.RandomStringUtil
public class RandomStringUtil
Generates random strings.
| Field Summary | |
|---|---|
protected static char[] |
ALPHA_NUMERIC_RANGE
|
protected static char[] |
ALPHA_RANGE
|
protected static java.util.Random |
rnd
|
| Constructor Summary | |
|---|---|
RandomStringUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
random(int count,
char[] chars)
Creates random string whose length is the number of characters specified. |
static java.lang.String |
random(int count,
char start,
char end)
Creates random string whose length is the number of characters specified. |
static java.lang.String |
random(int count,
java.lang.String chars)
Creates random string whose length is the number of characters specified. |
static java.lang.String |
randomAlpha(int count)
Creates random string of characters. |
static java.lang.String |
randomAlphaNumeric(int count)
Creates random string of characters and digits. |
static java.lang.String |
randomAscii(int count)
Creates random string whose length is the number of characters specified. |
static java.lang.String |
randomNumeric(int count)
Creates random string that consist only of numbers. |
static java.lang.String |
randomRanges(int count,
char... ranges)
Creates random string whose length is the number of characters specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.util.Random rnd
protected static final char[] ALPHA_RANGE
protected static final char[] ALPHA_NUMERIC_RANGE
| Constructor Detail |
|---|
public RandomStringUtil()
| Method Detail |
|---|
public static java.lang.String random(int count,
char[] chars)
public static java.lang.String random(int count,
java.lang.String chars)
public static java.lang.String random(int count,
char start,
char end)
public static java.lang.String randomAscii(int count)
32 and 126 (inclusive).
public static java.lang.String randomNumeric(int count)
public static java.lang.String randomRanges(int count,
char... ranges)
public static java.lang.String randomAlpha(int count)
public static java.lang.String randomAlphaNumeric(int count)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||