Scala Library


scala/util/Random.scala
]
class
Random(val
self : java.util.Random)
extends
AnyRefAdditional Constructor Summary  
def

this
(seed : Long) : Random
Creates a new random number generator using a single long seed.

def

this
: Random
Creates a new random number generator.

def

this
(seed : Int) : Random
Creates a new random number generator using a single integer seed.

Method Summary  
def

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

def

nextBytes
(bytes : Array[Byte]) : Unit
Generates random bytes and places them into a usersupplied byte
array.

def

nextDouble
: Double
Returns the next pseudorandom, uniformly distributed double value
between 0.0 and 1.0 from this random number generator's sequence.

def

nextFloat
: Float
Returns the next pseudorandom, uniformly distributed float value
between 0.0 and 1.0 from this random number generator's sequence.

def

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

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.

def

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

def

setSeed (seed : Long) : Unit 
Methods inherited from AnyRef  
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized 
Methods inherited from Any  
==, !=, isInstanceOf, asInstanceOf 
Additional Constructor Details 
def
this : Random
Method Details 
def
nextBoolean : Boolean
def
nextDouble : Double
def
nextFloat : Float
def
nextInt : Int
def
nextLong : Long
Scala Library

