public class AuditableRandomGenerator extends Object implements PseudoRandomGenerator
AuditableRandomGenerator is a PseudoRandomGenerator which can be audited
to know when a random generation method is called.| Modifier and Type | Class and Description |
|---|---|
static class |
AuditableRandomGenerator.Audit |
static class |
AuditableRandomGenerator.Bounds |
static class |
AuditableRandomGenerator.RandomMethod |
| Constructor and Description |
|---|
AuditableRandomGenerator(PseudoRandomGenerator generator) |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(java.util.function.Consumer<AuditableRandomGenerator.Audit> listener) |
String |
getName() |
long |
getSeed() |
double |
nextDouble() |
double |
nextDouble(double lowerBound,
double upperBound) |
int |
nextInt(int lowerBound,
int upperBound) |
void |
removeListener(java.util.function.Consumer<AuditableRandomGenerator.Audit> listener) |
void |
setSeed(long seed) |
public AuditableRandomGenerator(PseudoRandomGenerator generator)
public void addListener(java.util.function.Consumer<AuditableRandomGenerator.Audit> listener)
public void removeListener(java.util.function.Consumer<AuditableRandomGenerator.Audit> listener)
public int nextInt(int lowerBound,
int upperBound)
nextInt in interface PseudoRandomGeneratorpublic double nextDouble(double lowerBound,
double upperBound)
nextDouble in interface PseudoRandomGeneratorpublic double nextDouble()
nextDouble in interface PseudoRandomGeneratorpublic void setSeed(long seed)
setSeed in interface PseudoRandomGeneratorpublic long getSeed()
getSeed in interface PseudoRandomGeneratorpublic String getName()
getName in interface PseudoRandomGeneratorCopyright © 2018. All rights reserved.