public class Java2Random extends Random implements StreamInterface
java.util.Random class
which implements the StreamInterface.
(c) copyright 2004 Delft
University of Technology , the Netherlands.
See for project information
www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
| Modifier and Type | Field and Description |
|---|---|
protected long |
seed
seed is a link to the seed value.
|
| Constructor and Description |
|---|
Java2Random()
creates a new Java2Random and in initializes with
System.currentTimeMillis constructs a new Java2Random
|
Java2Random(long seed) |
| Modifier and Type | Method and Description |
|---|---|
long |
getSeed()
returns the seed of the generator
|
int |
nextInt(int i,
int j)
Method returns (pseudo)random number from the stream over the integers i
and j .
|
void |
reset()
resets a stream
|
void |
setSeed(long seed)
sets the seed of the generator
|
next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLongclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnextBoolean, nextDouble, nextFloat, nextInt, nextLongprotected long seed
public Java2Random()
public Java2Random(long seed)
Random.Random(long)public void reset()
reset in interface StreamInterfaceStreamInterface.reset()public int nextInt(int i,
int j)
StreamInterfacenextInt in interface StreamInterfacei - the minimal valuej - the maximum valueStreamInterface.nextInt(int,
int)public void setSeed(long seed)
StreamInterfacesetSeed in interface StreamInterfacesetSeed in class Randomseed - the new seedRandom.setSeed(long)public long getSeed()
StreamInterfacegetSeed in interface StreamInterfaceStreamInterface.getSeed()Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.