The object Random offers a default implementation of scala.util.Random and random-related convenience methods.
| Supertypes | |
|---|---|
| Self type |
Returns a LazyList of pseudorandomly chosen alphanumeric characters, equally chosen from A-Z, a-z, and 0-9.
| Inherited from | Random |
|---|
Returns a pseudorandom, uniformly distributed long value between min (inclusive) and the specified value max (exclusive), drawn from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns a pseudorandom, uniformly distributed int value between min (inclusive) and the specified value max (exclusive), drawn from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed float value between min (inclusive) and max (exclusive) from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed double value between min (inclusive) and max (exclusive) from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence.
| Inherited from | Random |
|---|
Generates n random bytes and returns them in a new array.
| Inherited from | Random |
|---|
Generates random bytes and places them into a user-supplied byte array.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed double value between 0.0 and 1.0 from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed float value between 0.0 and 1.0 from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0.0 and standard deviation 1.0 from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns a pseudorandom, uniformly distributed long value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed long value from this random number generator's sequence.
| Inherited from | Random |
|---|
Returns the next pseudorandom, uniformly distributed value from the ASCII range 33-126.
| Inherited from | Random |
|---|
Returns a pseudorandomly generated String. This routine does not take any measures to preserve the randomness of the distribution in the face of factors like unicode's variable-length encoding, so please don't use this for anything important. It's primarily intended for generating test data.
| Value parameters |
|
|---|---|
| Returns | the String |
| Inherited from | Random |
| Inherited from | Random |
|---|
Returns a new collection of the same type in a randomly chosen order.
| Returns | the shuffled collection |
|---|---|
| Inherited from | Random |
| Inherited from | Random |
|---|
© 2002-2022 EPFL, with contributions from Lightbend.
Licensed under the Apache License, Version 2.0.
https://scala-lang.org/api/3.2.0/scala/util/Random$.html