public class RandomString
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALPHANUM |
static java.lang.String |
DIGITS |
static java.lang.String |
LOWER |
static java.lang.String |
UPPER |
Constructor and Description |
---|
RandomString() |
RandomString(int length)
Create an alphanumeric strings from a secure generator.
|
RandomString(int length,
java.util.Random random)
Create an alphanumeric string generator.
|
RandomString(int length,
java.util.Random random,
java.lang.String symbols) |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getAlphanum() |
char[] |
getBuf() |
static java.lang.String |
getDigits() |
static java.lang.String |
getLower() |
int |
getMaxLength() |
java.util.Random |
getRandom() |
char[] |
getSymbols() |
static java.lang.String |
getUpper() |
static void |
main(java.lang.String[] args) |
java.lang.String |
nextFixedRandomString() |
java.lang.String |
nextRandomSizeString() |
java.lang.String |
nextString()
Generate a random string.
|
void |
setBuf(char[] buf) |
void |
setMaxLength(int maxLength) |
void |
setRandom(java.util.Random random) |
void |
setSymbols(char[] symbols) |
public static final java.lang.String UPPER
public static final java.lang.String LOWER
public static final java.lang.String DIGITS
public static final java.lang.String ALPHANUM
public RandomString()
public RandomString(int length, java.util.Random random, java.lang.String symbols)
public RandomString(int length, java.util.Random random)
public RandomString(int length)
public java.lang.String nextString()
public java.lang.String nextRandomSizeString()
public java.lang.String nextFixedRandomString()
public static void main(java.lang.String[] args)
public static java.lang.String getUpper()
public static java.lang.String getLower()
public static java.lang.String getDigits()
public static java.lang.String getAlphanum()
public java.util.Random getRandom()
public char[] getSymbols()
public char[] getBuf()
public int getMaxLength()
public void setMaxLength(int maxLength)
public void setRandom(java.util.Random random)
public void setSymbols(char[] symbols)
public void setBuf(char[] buf)