/**@class java.util.concurrent.ThreadLocalRandom @extends java.util.Random A random number generator isolated to the current thread. Like the global {@link java.util.Random} generator used by the {@link java.lang.Math} class, a {@code ThreadLocalRandom} is initialized with an internally generated seed that may not otherwise be modified. When applicable, use of {@code ThreadLocalRandom} rather than shared {@code Random} objects in concurrent programs will typically encounter much less overhead and contention. Use of {@code ThreadLocalRandom} is particularly appropriate when multiple tasks (for example, each a {@link java.util.concurrent.ForkJoinTask}) use random numbers in parallel in thread pools. <p>Usages of this class should typically be of the form: {@code ThreadLocalRandom.current().nextX(...)} (where {@code X} is {@code Int}, {@code Long}, etc). When all usages are of this form, it is never possible to accidently share a {@code ThreadLocalRandom} across multiple threads. <p>This class also provides additional commonly used bounded random generation methods. <p>Instances of {@code ThreadLocalRandom} are not cryptographically secure. Consider instead using {@link java.security.SecureRandom} in security-sensitive applications. Additionally, default-constructed instances do not use a cryptographically random seed unless the {@linkplain System#getProperty system property} {@code java.util.secureRandomSeed} is set to {@code true}. @since 1.7 @author Doug Lea */ var ThreadLocalRandom = { /**Returns the current thread's {@code ThreadLocalRandom}. @return {Object {java.util.concurrent.ThreadLocalRandom}} the current thread's {@code ThreadLocalRandom} */ current : function( ) {}, /**Throws {@code UnsupportedOperationException}. Setting seeds in this generator is not supported. @throws UnsupportedOperationException always */ setSeed : function( ) {}, /**Returns a pseudorandom {@code int} value. @return {Number} a pseudorandom {@code int} value */ nextInt : function( ) {}, /**Returns a pseudorandom {@code int} value between zero (inclusive) and the specified bound (exclusive). @param {Number} bound the upper bound (exclusive). Must be positive. @return {Number} a pseudorandom {@code int} value between zero (inclusive) and the bound (exclusive) @throws IllegalArgumentException if {@code bound} is not positive */ nextInt : function( ) {}, /**Returns a pseudorandom {@code int} value between the specified origin (inclusive) and the specified bound (exclusive). @param {Number} origin the least value returned @param {Number} bound the upper bound (exclusive) @return {Number} a pseudorandom {@code int} value between the origin (inclusive) and the bound (exclusive) @throws IllegalArgumentException if {@code origin} is greater than or equal to {@code bound} */ nextInt : function( ) {}, /**Returns a pseudorandom {@code long} value. @return {Number} a pseudorandom {@code long} value */ nextLong : function( ) {}, /**Returns a pseudorandom {@code long} value between zero (inclusive) and the specified bound (exclusive). @param {Number} bound the upper bound (exclusive). Must be positive. @return {Number} a pseudorandom {@code long} value between zero (inclusive) and the bound (exclusive) @throws IllegalArgumentException if {@code bound} is not positive */ nextLong : function( ) {}, /**Returns a pseudorandom {@code long} value between the specified origin (inclusive) and the specified bound (exclusive). @param {Number} origin the least value returned @param {Number} bound the upper bound (exclusive) @return {Number} a pseudorandom {@code long} value between the origin (inclusive) and the bound (exclusive) @throws IllegalArgumentException if {@code origin} is greater than or equal to {@code bound} */ nextLong : function( ) {}, /**Returns a pseudorandom {@code double} value between zero (inclusive) and one (exclusive). @return {Number} a pseudorandom {@code double} value between zero (inclusive) and one (exclusive) */ nextDouble : function( ) {}, /**Returns a pseudorandom {@code double} value between 0.0 (inclusive) and the specified bound (exclusive). @param {Number} bound the upper bound (exclusive). Must be positive. @return {Number} a pseudorandom {@code double} value between zero (inclusive) and the bound (exclusive) @throws IllegalArgumentException if {@code bound} is not positive */ nextDouble : function( ) {}, /**Returns a pseudorandom {@code double} value between the specified origin (inclusive) and bound (exclusive). @param {Number} origin the least value returned @param {Number} bound the upper bound (exclusive) @return {Number} a pseudorandom {@code double} value between the origin (inclusive) and the bound (exclusive) @throws IllegalArgumentException if {@code origin} is greater than or equal to {@code bound} */ nextDouble : function( ) {}, /**Returns a pseudorandom {@code boolean} value. @return {Boolean} a pseudorandom {@code boolean} value */ nextBoolean : function( ) {}, /**Returns a pseudorandom {@code float} value between zero (inclusive) and one (exclusive). @return {Number} a pseudorandom {@code float} value between zero (inclusive) and one (exclusive) */ nextFloat : function( ) {}, /** */ nextGaussian : function( ) {}, /**Returns a stream producing the given {@code streamSize} number of pseudorandom {@code int} values. @param {Number} streamSize the number of values to generate @return {Object {java.util.stream.IntStream}} a stream of pseudorandom {@code int} values @throws IllegalArgumentException if {@code streamSize} is less than zero @since 1.8 */ ints : function( ) {}, /**Returns an effectively unlimited stream of pseudorandom {@code int} values. @implNote This method is implemented to be equivalent to {@code ints(Long.MAX_VALUE)}. @return {Object {java.util.stream.IntStream}} a stream of pseudorandom {@code int} values @since 1.8 */ ints : function( ) {}, /**Returns a stream producing the given {@code streamSize} number of pseudorandom {@code int} values, each conforming to the given origin (inclusive) and bound (exclusive). @param {Number} streamSize the number of values to generate @param {Number} randomNumberOrigin the origin (inclusive) of each random value @param {Number} randomNumberBound the bound (exclusive) of each random value @return {Object {java.util.stream.IntStream}} a stream of pseudorandom {@code int} values, each with the given origin (inclusive) and bound (exclusive) @throws IllegalArgumentException if {@code streamSize} is less than zero, or {@code randomNumberOrigin} is greater than or equal to {@code randomNumberBound} @since 1.8 */ ints : function( ) {}, /**Returns an effectively unlimited stream of pseudorandom {@code int} values, each conforming to the given origin (inclusive) and bound (exclusive). @param {Number} randomNumberOrigin the origin (inclusive) of each random value @param {Number} randomNumberBound the bound (exclusive) of each random value @param randomNumberBound the bound (exclusive) of each random value @return {Object {java.util.stream.IntStream}} a stream of pseudorandom {@code int} values, each with the given origin (inclusive) and bound (exclusive) @throws IllegalArgumentException if {@code randomNumberOrigin} is greater than or equal to {@code randomNumberBound} @since 1.8 */ ints : function( ) {}, /**Returns a stream producing the given {@code streamSize} number of pseudorandom {@code long} values. @param {Number} streamSize the number of values to generate @return {Object {java.util.stream.LongStream}} a stream of pseudorandom {@code long} values @throws IllegalArgumentException if {@code streamSize} is less than zero @since 1.8 */ longs : function( ) {}, /**Returns an effectively unlimited stream of pseudorandom {@code long} values. @implNote This method is implemented to be equivalent to {@code longs(Long.MAX_VALUE)}. @return {Object {java.util.stream.LongStream}} a stream of pseudorandom {@code long} values @since 1.8 */ longs : function( ) {}, /**Returns a stream producing the given {@code streamSize} number of pseudorandom {@code long}, each conforming to the given origin (inclusive) and bound (exclusive). @param {Number} streamSize the number of values to generate @param {Number} randomNumberOrigin the origin (inclusive) of each random value @param {Number} randomNumberBound the bound (exclusive) of each random value @return {Object {java.util.stream.LongStream}} a stream of pseudorandom {@code long} values, each with the given origin (inclusive) and bound (exclusive) @throws IllegalArgumentException if {@code streamSize} is less than zero, or {@code randomNumberOrigin} is greater than or equal to {@code randomNumberBound} @since 1.8 */ longs : function( ) {}, /**Returns an effectively unlimited stream of pseudorandom {@code long} values, each conforming to the given origin (inclusive) and bound (exclusive). @param {Number} randomNumberOrigin the origin (inclusive) of each random value @param {Number} randomNumberBound the bound (exclusive) of each random value @param randomNumberBound the bound (exclusive) of each random value @return {Object {java.util.stream.LongStream}} a stream of pseudorandom {@code long} values, each with the given origin (inclusive) and bound (exclusive) @throws IllegalArgumentException if {@code randomNumberOrigin} is greater than or equal to {@code randomNumberBound} @since 1.8 */ longs : function( ) {}, /**Returns a stream producing the given {@code streamSize} number of pseudorandom {@code double} values, each between zero (inclusive) and one (exclusive). @param {Number} streamSize the number of values to generate @return {Object {java.util.stream.DoubleStream}} a stream of {@code double} values @throws IllegalArgumentException if {@code streamSize} is less than zero @since 1.8 */ doubles : function( ) {}, /**Returns an effectively unlimited stream of pseudorandom {@code double} values, each between zero (inclusive) and one (exclusive). @implNote This method is implemented to be equivalent to {@code doubles(Long.MAX_VALUE)}. @return {Object {java.util.stream.DoubleStream}} a stream of pseudorandom {@code double} values @since 1.8 */ doubles : function( ) {}, /**Returns a stream producing the given {@code streamSize} number of pseudorandom {@code double} values, each conforming to the given origin (inclusive) and bound (exclusive). @param {Number} streamSize the number of values to generate @param {Number} randomNumberOrigin the origin (inclusive) of each random value @param {Number} randomNumberBound the bound (exclusive) of each random value @return {Object {java.util.stream.DoubleStream}} a stream of pseudorandom {@code double} values, each with the given origin (inclusive) and bound (exclusive) @throws IllegalArgumentException if {@code streamSize} is less than zero @throws IllegalArgumentException if {@code randomNumberOrigin} is greater than or equal to {@code randomNumberBound} @since 1.8 */ doubles : function( ) {}, /**Returns an effectively unlimited stream of pseudorandom {@code double} values, each conforming to the given origin (inclusive) and bound (exclusive). @param {Number} randomNumberOrigin the origin (inclusive) of each random value @param {Number} randomNumberBound the bound (exclusive) of each random value @param randomNumberBound the bound (exclusive) of each random value @return {Object {java.util.stream.DoubleStream}} a stream of pseudorandom {@code double} values, each with the given origin (inclusive) and bound (exclusive) @throws IllegalArgumentException if {@code randomNumberOrigin} is greater than or equal to {@code randomNumberBound} @since 1.8 */ doubles : function( ) {}, };