Package org.apache.commons.rng.simple
Class ThreadLocalRandomSource.ThreadLocalRng
- java.lang.Object
-
- java.lang.ThreadLocal<UniformRandomProvider>
-
- org.apache.commons.rng.simple.ThreadLocalRandomSource.ThreadLocalRng
-
- Enclosing class:
- ThreadLocalRandomSource
private static class ThreadLocalRandomSource.ThreadLocalRng extends java.lang.ThreadLocal<UniformRandomProvider>
Extend theThreadLocal
to allow creation of the desiredRandomSource
.
-
-
Field Summary
Fields Modifier and Type Field Description private RandomSource
source
The source.
-
Constructor Summary
Constructors Constructor Description ThreadLocalRng(RandomSource source)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected UniformRandomProvider
initialValue()
-
-
-
Field Detail
-
source
private final RandomSource source
The source.
-
-
Constructor Detail
-
ThreadLocalRng
ThreadLocalRng(RandomSource source)
Create a new instance.- Parameters:
source
- the source
-
-
Method Detail
-
initialValue
protected UniformRandomProvider initialValue()
- Overrides:
initialValue
in classjava.lang.ThreadLocal<UniformRandomProvider>
-
-