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
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 interfaceStreamInterface
-
nextDouble
public double nextDouble()- Specified by:
nextDoublein interfaceStreamInterface
-
nextFloat
public float nextFloat()- Specified by:
nextFloatin interfaceStreamInterface
-
nextInt
public int nextInt()- Specified by:
nextIntin interfaceStreamInterface
-
nextInt
public int nextInt(int i, int j) - Specified by:
nextIntin interfaceStreamInterface
-
nextLong
public long nextLong()- Specified by:
nextLongin interfaceStreamInterface
-
getSeed
public long getSeed()- Specified by:
getSeedin interfaceStreamInterface
-
setSeed
public void setSeed(long seed) - Specified by:
setSeedin interfaceStreamInterface
-
reset
public void reset()- Specified by:
resetin interfaceStreamInterface
-
saveState
- Specified by:
saveStatein interfaceStreamInterface- Throws:
StreamException
-
restoreState
- Specified by:
restoreStatein interfaceStreamInterface- Throws:
StreamException
-
getOriginalSeed
public long getOriginalSeed()- Specified by:
getOriginalSeedin interfaceStreamInterface
-