Package org.opentrafficsim.core.math
Class DrawTest.FixedStream
- java.lang.Object
-
- org.opentrafficsim.core.math.DrawTest.FixedStream
-
- All Implemented Interfaces:
Serializable
,StreamInterface
- Enclosing class:
- DrawTest
static class DrawTest.FixedStream extends Object implements StreamInterface
Implementation of StreamInterface that returns a constant value.
-
-
Constructor Summary
Constructors Constructor Description FixedStream(double result)
Construct a new FixedStream.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getOriginalSeed()
long
getSeed()
boolean
nextBoolean()
double
nextDouble()
float
nextFloat()
int
nextInt()
int
nextInt(int i, int j)
long
nextLong()
void
reset()
void
restoreState(byte[] state)
byte[]
saveState()
void
setSeed(long seed)
-
-
-
Method Detail
-
nextBoolean
public boolean nextBoolean()
- Specified by:
nextBoolean
in interfaceStreamInterface
-
nextDouble
public double nextDouble()
- Specified by:
nextDouble
in interfaceStreamInterface
-
nextFloat
public float nextFloat()
- Specified by:
nextFloat
in interfaceStreamInterface
-
nextInt
public int nextInt()
- Specified by:
nextInt
in interfaceStreamInterface
-
nextInt
public int nextInt(int i, int j)
- Specified by:
nextInt
in interfaceStreamInterface
-
nextLong
public long nextLong()
- Specified by:
nextLong
in interfaceStreamInterface
-
getSeed
public long getSeed()
- Specified by:
getSeed
in interfaceStreamInterface
-
setSeed
public void setSeed(long seed)
- Specified by:
setSeed
in interfaceStreamInterface
-
reset
public void reset()
- Specified by:
reset
in interfaceStreamInterface
-
saveState
public byte[] saveState() throws StreamException
- Specified by:
saveState
in interfaceStreamInterface
- Throws:
StreamException
-
restoreState
public void restoreState(byte[] state) throws StreamException
- Specified by:
restoreState
in interfaceStreamInterface
- Throws:
StreamException
-
getOriginalSeed
public long getOriginalSeed()
- Specified by:
getOriginalSeed
in interfaceStreamInterface
-
-