Package jline.util

Class ThreadLocalRandom

java.lang.Object
jline.util.ThreadLocalRandom

public class ThreadLocalRandom extends Object
Deprecated.
Use RandomManager directly for new code. This class is maintained for backward compatibility.
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
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    Deprecated.
    Generates a random double value in [0.0, 1.0) using the thread-specific MersenneTwister.
    static void
    setSeed(int seed)
    Deprecated.
    Sets the seed for the current thread's random number generator.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ThreadLocalRandom

      public ThreadLocalRandom()
      Deprecated.
  • Method Details

    • random

      public static double random()
      Deprecated.
      Generates a random double value in [0.0, 1.0) using the thread-specific MersenneTwister.
      Returns:
      random double value
    • setSeed

      public static void setSeed(int seed)
      Deprecated.
      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