Kactoos

kactoos-jvm / nnl.rocks.kactoos.text / RandomText

RandomText

class RandomText : Text

Random text.

There is no thread-safety guarantee.

Parameters

characters - List of characters allowed for generating.

length - Length of generated text.

random - Characters index randomizer.

Since 0.4

Constructors

| 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. |

Functions

Name Summary
asString fun asString(): String
Convert it to the string.