Package org.opentrafficsim.core.math
Class DrawTest.FixedStream
java.lang.Object
org.opentrafficsim.core.math.DrawTest.FixedStream
- All Implemented Interfaces:
Serializable
,nl.tudelft.simulation.jstats.streams.StreamInterface
- Enclosing class:
- DrawTest
static class DrawTest.FixedStream
extends Object
implements nl.tudelft.simulation.jstats.streams.StreamInterface
Implementation of StreamInterface that returns a constant value.
-
Constructor Details
-
FixedStream
FixedStream(double result) Construct a new FixedStream.- Parameters:
result
- double; the result of the nextDouble method. All other methods return a suitable approximation of this value.
-
-
Method Details
-
nextBoolean
public boolean nextBoolean()- Specified by:
nextBoolean
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextDouble
public double nextDouble()- Specified by:
nextDouble
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextFloat
public float nextFloat()- Specified by:
nextFloat
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextInt
public int nextInt()- Specified by:
nextInt
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextInt
public int nextInt(int i, int j) - Specified by:
nextInt
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextLong
public long nextLong()- Specified by:
nextLong
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
getSeed
public long getSeed()- Specified by:
getSeed
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
setSeed
public void setSeed(long seed) - Specified by:
setSeed
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
reset
public void reset()- Specified by:
reset
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
saveState
public byte[] saveState() throws nl.tudelft.simulation.jstats.streams.StreamException- Specified by:
saveState
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
- Throws:
nl.tudelft.simulation.jstats.streams.StreamException
-
restoreState
public void restoreState(byte[] state) throws nl.tudelft.simulation.jstats.streams.StreamException - Specified by:
restoreState
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
- Throws:
nl.tudelft.simulation.jstats.streams.StreamException
-
getOriginalSeed
public long getOriginalSeed()- Specified by:
getOriginalSeed
in interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-