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. |
535 |
> |
* low-order bits. Because this class has no subclasses, this |
536 |
> |
* method cannot be invoked or overridden. |
537 |
|
* |
538 |
|
* @param bits random bits |
539 |
|
* @return the next pseudorandom value from this random number |
540 |
|
* generator's sequence |
541 |
|
*/ |
542 |
|
protected int next(int bits) { |
543 |
< |
return (int)(nextLong() >>> (64 - bits)); |
543 |
> |
return nextInt() >>> (32 - bits); |
544 |
|
} |
545 |
|
|
546 |
|
/** |