[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.15, Fri Aug 9 12:12:10 2013 UTC revision 1.16, Tue Aug 13 17:13:57 2013 UTC
# Line 410  Line 410 
410       *        positive.       *        positive.
411       * @return a pseudorandom {@code int} value between zero       * @return a pseudorandom {@code int} value between zero
412       *         (inclusive) and the bound (exclusive)       *         (inclusive) and the bound (exclusive)
413       * @throws IllegalArgumentException if the bound is less than zero       * @throws IllegalArgumentException if {@code bound} is not positive
414       */       */
415      public int nextInt(int bound) {      public int nextInt(int bound) {
416          if (bound <= 0)          if (bound <= 0)
# Line 463  Line 463 
463       *        positive.       *        positive.
464       * @return a pseudorandom {@code long} value between zero       * @return a pseudorandom {@code long} value between zero
465       *         (inclusive) and the bound (exclusive)       *         (inclusive) and the bound (exclusive)
466       * @throws IllegalArgumentException if {@code bound} is less than zero       * @throws IllegalArgumentException if {@code bound} is not positive
467       */       */
468      public long nextLong(long bound) {      public long nextLong(long bound) {
469          if (bound <= 0)          if (bound <= 0)
# Line 518  Line 518 
518       *        positive.       *        positive.
519       * @return a pseudorandom {@code double} value between zero       * @return a pseudorandom {@code double} value between zero
520       *         (inclusive) and the bound (exclusive)       *         (inclusive) and the bound (exclusive)
521       * @throws IllegalArgumentException if {@code bound} is less than zero       * @throws IllegalArgumentException if {@code bound} is not positive
522       */       */
523      public double nextDouble(double bound) {      public double nextDouble(double bound) {
524          if (!(bound > 0.0))          if (!(bound > 0.0))
# Line 558  Line 558 
558      // maintenance purposes the small differences across forms.      // maintenance purposes the small differences across forms.
559    
560      /**      /**
561       * Returns a stream producing the given {@code streamSize} number of       * Returns a stream producing the given {@code streamSize} number
562       * pseudorandom {@code int} values.       * of pseudorandom {@code int} values from this generator and/or
563         * one split from it.
564       *       *
565       * @param streamSize the number of values to generate       * @param streamSize the number of values to generate
566       * @return a stream of pseudorandom {@code int} values       * @return a stream of pseudorandom {@code int} values
# Line 577  Line 578 
578    
579      /**      /**
580       * Returns an effectively unlimited stream of pseudorandom {@code int}       * Returns an effectively unlimited stream of pseudorandom {@code int}
581       * values.       * values from this generator and/or one split from it.
582       *       *
583       * @implNote This method is implemented to be equivalent to {@code       * @implNote This method is implemented to be equivalent to {@code
584       * ints(Long.MAX_VALUE)}.       * ints(Long.MAX_VALUE)}.
# Line 592  Line 593 
593      }      }
594    
595      /**      /**
596       * Returns a stream producing the given {@code streamSize} number of       * Returns a stream producing the given {@code streamSize} number
597       * pseudorandom {@code int} values, each conforming to the given       * of pseudorandom {@code int} values, each conforming to the
598       * origin and bound.       * given origin and bound.
599       *       *
600       * @param streamSize the number of values to generate       * @param streamSize the number of values to generate
601       * @param randomNumberOrigin the origin of each random value       * @param randomNumberOrigin the origin of each random value
# Line 641  Line 642 
642      }      }
643    
644      /**      /**
645       * Returns a stream producing the given {@code streamSize} number of       * Returns a stream producing the given {@code streamSize} number
646       * pseudorandom {@code long} values.       * of pseudorandom {@code long} values from this generator and/or
647         * one split from it.
648       *       *
649       * @param streamSize the number of values to generate       * @param streamSize the number of values to generate
650       * @return a stream of pseudorandom {@code long} values       * @return a stream of pseudorandom {@code long} values
# Line 659  Line 661 
661      }      }
662    
663      /**      /**
664       * Returns an effectively unlimited stream of pseudorandom {@code long}       * Returns an effectively unlimited stream of pseudorandom {@code
665       * values.       * long} values from this generator and/or one split from it.
666       *       *
667       * @implNote This method is implemented to be equivalent to {@code       * @implNote This method is implemented to be equivalent to {@code
668       * longs(Long.MAX_VALUE)}.       * longs(Long.MAX_VALUE)}.

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8