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 longgetOriginalSeed()longgetSeed()booleannextBoolean()doublenextDouble()floatnextFloat()intnextInt()intnextInt(int i, int j)longnextLong()voidreset()voidrestoreState(byte[] state)byte[]saveState()voidsetSeed(long seed)
-
-
-
Method Detail
-
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
public byte[] saveState() throws StreamException- Specified by:
saveStatein interfaceStreamInterface- Throws:
StreamException
-
restoreState
public void restoreState(byte[] state) throws StreamException- Specified by:
restoreStatein interfaceStreamInterface- Throws:
StreamException
-
getOriginalSeed
public long getOriginalSeed()
- Specified by:
getOriginalSeedin interfaceStreamInterface
-
-