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:
nextBooleanin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextDouble
public double nextDouble()- Specified by:
nextDoublein interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextFloat
public float nextFloat()- Specified by:
nextFloatin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextInt
public int nextInt()- Specified by:
nextIntin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextInt
public int nextInt(int i, int j) - Specified by:
nextIntin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
nextLong
public long nextLong()- Specified by:
nextLongin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
getSeed
public long getSeed()- Specified by:
getSeedin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
setSeed
public void setSeed(long seed) - Specified by:
setSeedin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
reset
public void reset()- Specified by:
resetin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-
saveState
public byte[] saveState() throws nl.tudelft.simulation.jstats.streams.StreamException- Specified by:
saveStatein 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:
restoreStatein interfacenl.tudelft.simulation.jstats.streams.StreamInterface- Throws:
nl.tudelft.simulation.jstats.streams.StreamException
-
getOriginalSeed
public long getOriginalSeed()- Specified by:
getOriginalSeedin interfacenl.tudelft.simulation.jstats.streams.StreamInterface
-