RandomSourceGenerator

class RandomSourceGenerator(source: RandomSource, seed: Long?) : RandomGenerator

Functions

equals
Link copied to clipboard
open operator fun equals(other: Any?): Boolean
fillBytes
Link copied to clipboard
open override fun fillBytes(array: ByteArray, fromIndex: Int, toIndex: Int)
Fills a subrange of the specified byte array starting from fromIndex inclusive and ending toIndex exclusive with random bytes.
fork
Link copied to clipboard
open override fun fork(): RandomGenerator
Create a new generator which is independent from current generator (operations on new generator do not affect this one and vise versa).
hashCode
Link copied to clipboard
open fun hashCode(): Int
nextBoolean
Link copied to clipboard
open override fun nextBoolean(): Boolean
Gets the next random Boolean value.
nextBytes
Link copied to clipboard
open fun nextBytes(size: Int): ByteArray
Creates a byte array of the specified size, filled with random bytes.
nextDouble
Link copied to clipboard
open override fun nextDouble(): Double
Gets the next random Double value uniformly distributed between 0 (inclusive) and 1 (exclusive).
nextInt
Link copied to clipboard
open override fun nextInt(): Int
Gets the next random Int from the random number generator.
open override fun nextInt(until: Int): Int
Gets the next random non-negative Int from the random number generator less than the specified until bound.
nextLong
Link copied to clipboard
open override fun nextLong(): Long
Gets the next random Long from the random number generator.
open override fun nextLong(until: Long): Long
Gets the next random non-negative Long from the random number generator less than the specified until bound.
toString
Link copied to clipboard
open fun toString(): String

Properties

source
Link copied to clipboard
val source: RandomSource