java.lang.String values.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | DEFAULT_LENGTH
The default length of a randomized |
| private static final int | KEY_BITS
The amount of bits to extract out of an integer for each key generated. |
| private final int | length
The length of the random strings that are created by this instance. |
| private final Random | random
A provider of random values. |
| private static final char[] | SYMBOL
The symbols which are used to create a random |
| Access | Constructor and Description |
|---|---|
| public | RandomString()
Creates a random |
| public | RandomString(int
The length of the random length)String.Creates a random |
| public | RandomString(int
The length of the random length, Random String.The random number generator to use. random)Creates a random |
| Modifier and Type | Method and Description |
|---|---|
| public static String | |
| public static String | Returns: A string representing the supplied value as a string.The value to represent as a string. value)Represents an integer value as a string hash. |
| public static String | Returns: A randomjava..Creates a random |
| public static String | Returns: A randomjava..The length of the random length)String.Creates a random |
| public String | Returns: A randomjava. of the given length for this instance.Creates a new random |
| DEFAULT_LENGTH | back to summary |
|---|---|
| public static final int DEFAULT_LENGTH The default length of a randomized | |
| KEY_BITS | back to summary |
|---|---|
| private static final int KEY_BITS The amount of bits to extract out of an integer for each key generated. | |
| length | back to summary |
|---|---|
| private final int length The length of the random strings that are created by this instance. | |
| random | back to summary |
|---|---|
| private final Random random A provider of random values. | |
| SYMBOL | back to summary |
|---|---|
| private static final char[] SYMBOL The symbols which are used to create a random | |
| RandomString | back to summary |
|---|---|
| public RandomString() Creates a random | |
| RandomString | back to summary |
|---|---|
| public RandomString(int length) Creates a random
| |
| RandomString | back to summary |
|---|---|
| public RandomString(int length, Random random) Creates a random | |
| hashOf | back to summary |
|---|---|
| public static String hashOf(Object value) Represents a object value as a string hash. This string is not technically random but generates a fixed character sequence based on the hash provided. | |
| hashOf | back to summary |
|---|---|
| public static String hashOf(int value) Represents an integer value as a string hash. This string is not technically random but generates a fixed character sequence based on the hash provided.
| |
| make | back to summary |
|---|---|
| public static String make() Creates a random
| |
| make | back to summary |
|---|---|
| public static String make(int length) Creates a random
| |
| nextString | back to summary |
|---|---|
| public String nextString() Creates a new random
| |