531 |
|
} |
532 |
|
|
533 |
|
/** |
534 |
– |
* Generates a pseudorandom number with the indicated number of |
535 |
– |
* bits. Unlike in superclass @{link Random}, this method is never |
536 |
– |
* internally called or used by any other publicly accessible |
537 |
– |
* method. |
538 |
– |
* |
539 |
– |
* @param bits random bits |
540 |
– |
* @return the next pseudorandom value from this random number |
541 |
– |
* generator's sequence |
542 |
– |
*/ |
543 |
– |
protected int next(int bits) { |
544 |
– |
return (int)(nextLong() >>> (64 - bits)); |
545 |
– |
} |
546 |
– |
|
547 |
– |
/** |
534 |
|
* Returns a pseudorandom {@code double} value between the specified |
535 |
|
* origin (inclusive) and bound (exclusive). |
536 |
|
* |