public interface StreamInterface extends Serializable
(c) copyright 2002-2005-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 | Method and Description |
---|---|
long |
getSeed()
returns the seed of the generator
|
boolean |
nextBoolean()
Returns the next pseudorandom, uniformly distributed
boolean
value from this random number generator's sequence. |
double |
nextDouble()
Method return a (pseudo)random number from the stream over the interval
(0,1) using this stream, after advancing its state by one step.
|
float |
nextFloat()
Method return a (pseudo)random number from the stream over the interval
(0,1) using this stream, after advancing its state by one step.
|
int |
nextInt()
Method return a (pseudo)random number from the stream over using this
stream, after advancing its state by one step.
|
int |
nextInt(int i,
int j)
Method returns (pseudo)random number from the stream over the integers i
and j .
|
long |
nextLong()
Method return a (pseudo)random number from the stream over using this
stream, after advancing its state by one step.
|
void |
reset()
resets the stream
|
void |
setSeed(long seed)
sets the seed of the generator
|
boolean nextBoolean()
boolean
value from this random number generator's sequence. The general contract
of nextBoolean is that one boolean value is
pseudorandomly generated and returned. The values true
and
false
are produced with (approximately) equal probability.
The method nextBoolean is implemented by class Random
as follows: public boolean nextBoolean() { return next(1) != 0; }
boolean
value from this random number generator's sequence.double nextDouble()
float nextFloat()
int nextInt()
int nextInt(int i, int j)
i
- the minimal valuej
- the maximum valuelong nextLong()
long getSeed()
void setSeed(long seed)
seed
- the new seedvoid reset()
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.