nextLong

open override fun nextLong(): Long

Returns the next pseudo-random, uniformly distributed long value from this random number generator's sequence.

Subclasses should override this, as this is used by all other methods.


fun nextLong(n: Long): Long

Returns a pseudo-random, uniformly distributed long value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence. The algorithm used to generate the value guarantees that the result is uniform, provided that the sequence of 64-bit values produced by this generator is.

This implementation uses .nextLong internally.

Return

the next pseudo-random long value between 0 (inclusive) and n (exclusive).

Parameters

n

the positive bound on the random number to be returned.