public class DefaultRandomStringGenerator extends java.lang.Object implements RandomStringGenerator
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_RANDOM_LENGTH
The default maximum length.
|
Constructor and Description |
---|
DefaultRandomStringGenerator()
Instantiates a new default random string generator
with length set to
DEFAULT_MAX_RANDOM_LENGTH . |
DefaultRandomStringGenerator(int maxRandomLength)
Instantiates a new default random string generator.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaxLength() |
int |
getMinLength() |
java.lang.String |
getNewString() |
byte[] |
getNewStringAsBytes()
Gets the new string as bytes.
|
public static final int DEFAULT_MAX_RANDOM_LENGTH
public DefaultRandomStringGenerator()
DEFAULT_MAX_RANDOM_LENGTH
.public DefaultRandomStringGenerator(int maxRandomLength)
maxRandomLength
- the max random lengthpublic int getMinLength()
getMinLength
in interface RandomStringGenerator
public int getMaxLength()
getMaxLength
in interface RandomStringGenerator
public java.lang.String getNewString()
getNewString
in interface RandomStringGenerator
public byte[] getNewStringAsBytes()
RandomStringGenerator
getNewStringAsBytes
in interface RandomStringGenerator