scala.util

Random

object Random extends Random

The object Random offers a default implementation of scala.util.Random and random-related convenience methods.

Inherits

  1. Random
  2. AnyRef
  3. Any

Value Members

  1. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

  2. def hashCode(): Int

    Returns a hash code value for the object

  3. def nextASCIIString(length: Int): String

    Returns a pseudorandomly generated String drawing upon only ASCII characters between 33 and 126

  4. def nextBoolean(): Boolean

    Returns the next pseudorandom, uniformly distributed boolean value from this random number generator's sequence

  5. def nextBytes(bytes: Array[Byte]): Unit

    Generates random bytes and places them into a user-supplied byte array

  6. def nextDouble(): Double

    Returns the next pseudorandom, uniformly distributed double value between 0

  7. def nextFloat(): Float

    Returns the next pseudorandom, uniformly distributed float value between 0

  8. def nextGaussian(): Double

    Returns the next pseudorandom, Gaussian ("normally") distributed double value with mean 0

  9. def nextInt(n: Int): Int

    Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive), drawn from this random number generator's sequence

  10. def nextInt(): Int

    Returns the next pseudorandom, uniformly distributed int value from this random number generator's sequence

  11. def nextLong(): Long

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

  12. def nextString(length: Int): String

    Returns a pseudorandomly generated String

  13. val self: Random

  14. def setSeed(seed: Long): Unit

  15. def shuffle[T, CC](coll: CC[T])(bf: CanBuildFrom[CC[T], T, CC[T]]): CC[T]

    Returns a new collection of the same type in a randomly chosen order

  16. def toString(): String

    Returns a string representation of the object