- All Implemented Interfaces:
Prng
- Enclosing class:
- AddRedundancy
public static class AddRedundancy.SimplePrng
extends Object
implements Prng
Wrapper for the java random number generator (not normative).
-
Constructor Summary
Constructors
-
Method Summary
byte
Get the next random byte of the Prng.
void
Resets the Prng to the initially seeded state.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SimplePrng
public SimplePrng()
-
SimplePrng
public SimplePrng(long seed)
-
Method Details
-
nextByte
public byte nextByte()
Get the next random byte of the Prng.
- Specified by:
nextByte in interface Prng
- Returns:
- the next random byte
-
reset
public void reset()
Resets the Prng to the initially seeded state.
- Specified by:
reset in interface Prng