scala.util

Random

class Random extends AnyRef

go to: companion
known subclasses: Random
source: Random.scala
    authors:
  1. Stephane Micheloud

Inherited
  1. Hide All
  2. Show all
  1. AnyRef
  2. Any
Visibility
  1. Public
  2. All

Instance constructors

  1. new Random()

    Creates a new random number generator.

  2. new Random(seed: Int)

    Creates a new random number generator using a single integer seed.

  3. new Random(seed: Long)

    Creates a new random number generator using a single long seed.

  4. new Random(self: Random)

Value Members

  1. def !=(arg0: AnyRef): Boolean

  2. def !=(arg0: Any): Boolean

    o != arg0 is the same as !(o == (arg0)).

  3. def ##(): Int

  4. def $asInstanceOf[T0](): T0

  5. def $isInstanceOf[T0](): Boolean

  6. def ==(arg0: AnyRef): Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

  7. def ==(arg0: Any): Boolean

    o == arg0 is the same as o.equals(arg0).

  8. def asInstanceOf[T0]: T0

    This method is used to cast the receiver object to be of type T0.

  9. def clone(): AnyRef

    This method creates and returns a copy of the receiver object.

  10. def eq(arg0: AnyRef): Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

  11. def equals(arg0: Any): Boolean

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

  12. def finalize(): Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

  13. def getClass(): java.lang.Class[_ <: java.lang.Object]

    Returns a representation that corresponds to the dynamic class of the receiver object.

  14. def hashCode(): Int

    Returns a hash code value for the object.

  15. def isInstanceOf[T0]: Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

  16. def ne(arg0: AnyRef): Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

  17. def nextBoolean(): Boolean

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

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

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

  19. def nextDouble(): Double

    Returns the next pseudorandom, uniformly distributed double value between 0.

  20. def nextFloat(): Float

    Returns the next pseudorandom, uniformly distributed float value between 0.

  21. def nextGaussian(): Double

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

  22. 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.

  23. def nextInt(): Int

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

  24. def nextLong(): Long

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

  25. def nextPrintableChar(): Char

    Returns the next pseudorandom, uniformly distributed value from the ASCII range 33-126.

  26. def nextString(length: Int): String

    Returns a pseudorandomly generated String.

  27. def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

  28. def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

  29. val self: Random

  30. def setSeed(seed: Long): Unit

  31. def synchronized[T0](arg0: T0): T0

  32. def toString(): String

    Returns a string representation of the object.

  33. def wait(): Unit

  34. def wait(arg0: Long, arg1: Int): Unit

  35. def wait(arg0: Long): Unit