297 |
|
* positive. |
298 |
|
* @return a pseudorandom {@code int} value between zero |
299 |
|
* (inclusive) and the bound (exclusive) |
300 |
< |
* @throws IllegalArgumentException if the bound is less than zero |
300 |
> |
* @throws IllegalArgumentException if {@code bound} is not positive |
301 |
|
*/ |
302 |
|
public int nextInt(int bound) { |
303 |
|
if (bound <= 0) |
349 |
|
* positive. |
350 |
|
* @return a pseudorandom {@code long} value between zero |
351 |
|
* (inclusive) and the bound (exclusive) |
352 |
< |
* @throws IllegalArgumentException if {@code bound} is less than zero |
352 |
> |
* @throws IllegalArgumentException if {@code bound} is not positive |
353 |
|
*/ |
354 |
|
public long nextLong(long bound) { |
355 |
|
if (bound <= 0) |
403 |
|
* positive. |
404 |
|
* @return a pseudorandom {@code double} value between zero |
405 |
|
* (inclusive) and the bound (exclusive) |
406 |
< |
* @throws IllegalArgumentException if {@code bound} is less than zero |
406 |
> |
* @throws IllegalArgumentException if {@code bound} is not positive |
407 |
|
*/ |
408 |
|
public double nextDouble(double bound) { |
409 |
|
if (!(bound > 0.0)) |