Package java.util.concurrent
Class ThreadLocalRandom
java.lang.Object
java.util.Random
java.util.concurrent.ThreadLocalRandom
- All Implemented Interfaces:
Serializable,java.util.random.RandomGenerator
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.random.RandomGenerator
java.util.random.RandomGenerator.ArbitrarilyJumpableGenerator, java.util.random.RandomGenerator.JumpableGenerator, java.util.random.RandomGenerator.LeapableGenerator, java.util.random.RandomGenerator.SplittableGenerator, java.util.random.RandomGenerator.StreamableGenerator -
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadLocalRandomcurrent()Returns the current thread'sThreadLocalRandom.intnextInt(int minSize, int maxSize) Methods inherited from class java.util.Random
doubles, doubles, doubles, doubles, ints, ints, ints, ints, longs, longs, longs, longs, next, nextBoolean, nextBytes, nextDouble, nextFloat, nextGaussian, nextInt, nextInt, nextLong, setSeedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.random.RandomGenerator
isDeprecated, nextDouble, nextDouble, nextExponential, nextFloat, nextFloat, nextGaussian, nextLong, nextLong
-
Method Details
-
current
Returns the current thread'sThreadLocalRandom.- Returns:
- the current thread's
ThreadLocalRandom
-
nextInt
public int nextInt(int minSize, int maxSize)
-