public enum RandomStringType extends Enum<RandomStringType>
Types of characters to support in random string generation. The parameters for the random string type
are derived from RandomStringUtils.
| Enum Constant and Description |
|---|
ALL
Use all available characters.
|
ALPHABETIC
Use alphabetic characters only.
|
ALPHANUMERIC
Use alphabetic and numeric characters only.
|
ASCII
Use ASCII characters only.
|
NUMERIC
Use numeric characters only.
|
| Modifier and Type | Method and Description |
|---|---|
String |
get(int count)
Retrieve a random string of the given length.
|
String |
toString() |
static RandomStringType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RandomStringType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RandomStringType ALL
RandomStringUtils.random(int)public static final RandomStringType ASCII
RandomStringUtils.randomAscii(int)public static final RandomStringType ALPHABETIC
RandomStringUtils.randomAlphabetic(int)public static final RandomStringType ALPHANUMERIC
RandomStringUtils.randomAlphanumeric(int)public static final RandomStringType NUMERIC
RandomStringUtils.randomNumeric(int)public static RandomStringType[] values()
for (RandomStringType c : RandomStringType.values()) System.out.println(c);
public static RandomStringType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is null@Nonnull public String get(int count)
Retrieve a random string of the given length.
count - number of characterspublic String toString()
toString in class Enum<RandomStringType>Copyright © 2011-2013 CoreMedia AG. All Rights Reserved.