Package com.unboundid.util
Class ThreadLocalRandom
- java.lang.Object
-
- com.unboundid.util.ThreadLocalRandom
-
@ThreadSafety(level=COMPLETELY_THREADSAFE) public final class ThreadLocalRandom extends java.lang.Object
This class provides a means of obtaining a thread-local random number generator that can be used by the current thread without the need for synchronization.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Random
get()
Gets a thread-local random number generator instance.
-
-
-
Method Detail
-
get
public static java.util.Random get()
Gets a thread-local random number generator instance.- Returns:
- A thread-local random number generator instance.
-
-