Kactoos

kactoos-jvm / nnl.rocks.kactoos.text / RandomText / <init>

<init>

RandomText(len: Int) RandomText(len: KScalar<Int> = { SecureRandom().nextInt( RandomText.MAX_RANDOM_LENGTH - 1 ) + 1 })

Ctor.

Parameters

len - Length of generated text.RandomText(vararg chrs: Char)

Ctor.

Parameters

chrs - Array of characters allowed for generating.RandomText(len: KScalar<Int>, vararg chrs: Char)

Ctor.

Parameters

len - Length of generated text.

chrs - Array of characters allowed for generating.RandomText(characters: List<Char>, length: KScalar<Int> = { SecureRandom().nextInt(RandomText.MAX_RANDOM_LENGTH - 1) + 1 }, random: Random = SecureRandom())

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