Class Randomness
java.lang.Object
com.carrotsearch.randomizedtesting.Randomness
Per-thread, per-lifecycle state randomness defined as an initial seed and
the current Random instance.
An instance of this class will be typically available from RandomizedContext.
No need to instantiate manually.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SeedDecorator[]private final Randomprivate final longprivate final RandomSupplier -
Constructor Summary
ConstructorsConstructorDescriptionRandomness(long seed, RandomSupplier supplier, SeedDecorator... decorators) Randomness(Thread owner, RandomSupplier supplier, long seed, SeedDecorator... decorators) -
Method Summary
Modifier and TypeMethodDescription(package private) Randomnessprivate static longdecorate(long seed, SeedDecorator[] decorators) Decorate a given seed.(package private) voiddestroy()Invalidate the underling randomness.(package private) SeedDecorator[]Random instance for this randomness.(package private) RandomSupplier(package private) longgetSeed()Starting seed, read-only for tests.toString()
-
Field Details
-
seed
private final long seed -
random
-
supplier
-
decorators
-
-
Constructor Details
-
Randomness
-
Randomness
-
-
Method Details
-
getRandom
Random instance for this randomness. -
getRandomSupplier
RandomSupplier getRandomSupplier() -
getDecorators
SeedDecorator[] getDecorators() -
clone
-
toString
-
destroy
void destroy()Invalidate the underling randomness. -
getSeed
long getSeed()Starting seed, read-only for tests. -
decorate
Decorate a given seed.
-