[cvs] / jsr166 / src / main / java / util / SplittableRandom.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/SplittableRandom.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.32, Sat Feb 20 23:24:57 2016 UTC revision 1.33, Sat Nov 12 00:12:05 2016 UTC
# Line 531  Line 531 
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        /**
548       * Returns a pseudorandom {@code double} value between the specified       * Returns a pseudorandom {@code double} value between the specified
549       * origin (inclusive) and bound (exclusive).       * origin (inclusive) and bound (exclusive).
550       *       *

Legend:
Removed from v.1.32  
changed lines
  Added in v.1.33

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8