Provides limits relevant to generating random numbers on the current runtime.

By: John Vasileff

no subtypes hierarchy

Attributes
maxBitsSource Codeshared Integer maxBits

The largest value that may be used as an argument to Random.nextBits. maxBits is the greater of:

  1. runtime.integerAddressableSize, and

  2. The number of bits required to represent runtime.maxIntegerValue if the value of maxIntegerBound can be represented by 2n-1 for some n. Otherwise, one less than the number of bits required to represent runtime.maxIntegerValue.

maxBits is 64 for the Java runtime and 53 for the JavaScript runtime.

maxIntegerBoundSource Codeshared Integer maxIntegerBound

The largest value that may be used as an argument to Random.nextInteger. maxIntegerBound is the lesser of:

  1. runtime.maxIntegerValue, and

  2. 2n-1, where n = maxBits.

On both the Java and JavaScript runtimes, maxIntegerBound is equal to runtime.maxIntegerValue.

Inherited Attributes
Attributes inherited from: Object
Inherited Methods
Methods inherited from: Object