Package jline.util
Class ThreadLocalRandom
-
- All Implemented Interfaces:
public class ThreadLocalRandom
A class for random number generation in separate threads. This class now delegates to RandomManager for centralized, reproducible random number generation.
-
-
Constructor Summary
Constructors Constructor Description ThreadLocalRandom()
-
-
-
Method Detail
-
random
static double random()
Generates a random double value in [0.0, 1.0) using the thread-specific MersenneTwister.
- Returns:
random double value
-
setSeed
static void setSeed(int seed)
Sets the seed for the current thread's random number generator. For backward compatibility, this only affects the current thread.
- Parameters:
seed
- the seed value
-
-