kactoos-jvm / nnl.rocks.kactoos.text / RandomText
class RandomText :
Text
Random text.
There is no thread-safety guarantee.
characters
- List of characters allowed for generating.
length
- Length of generated text.
random
- Characters index randomizer.
Since 0.4
| Name | Summary |
|—|—|
| <init> | RandomText(len:
Int
)
RandomText(len:
KScalar
<
Int
> = {
SecureRandom().nextInt(
RandomText.MAX_RANDOM_LENGTH - 1
) + 1
})
RandomText(vararg chrs:
Char
)
RandomText(len:
KScalar
<
Int
>, vararg chrs:
Char
)
Ctor.RandomText(characters:
List
<
Char
>, length:
KScalar
<
Int
> = { SecureRandom().nextInt(RandomText.MAX_RANDOM_LENGTH - 1) + 1 }, random:
Random
= SecureRandom())
Random text. |
Name | Summary |
---|---|
asString | fun asString(): String Convert it to the string. |