[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.9, Sun Jul 14 03:47:31 2013 UTC revision 1.10, Sun Jul 14 08:06:49 2013 UTC
# Line 455  Line 455 
455       * @param bound the bound on the random number to be returned.  Must be       * @param bound the bound on the random number to be returned.  Must be
456       *        positive.       *        positive.
457       * @return a pseudorandom {@code int} value between zero       * @return a pseudorandom {@code int} value between zero
458       *         (inclusive) and the bound (exclusive).       *         (inclusive) and the bound (exclusive)
459       * @throws IllegalArgumentException if the bound is less than zero       * @throws IllegalArgumentException if the bound is less than zero
460       */       */
461      public int nextInt(int bound) {      public int nextInt(int bound) {
# Line 482  Line 482 
482       * @param origin the least value returned       * @param origin the least value returned
483       * @param bound the upper bound (exclusive)       * @param bound the upper bound (exclusive)
484       * @return a pseudorandom {@code int} value between the origin       * @return a pseudorandom {@code int} value between the origin
485       *         (inclusive) and the bound (exclusive).       *         (inclusive) and the bound (exclusive)
486       * @throws IllegalArgumentException if {@code origin} is greater than       * @throws IllegalArgumentException if {@code origin} is greater than
487       *         or equal to {@code bound}       *         or equal to {@code bound}
488       */       */
# Line 508  Line 508 
508       * @param bound the bound on the random number to be returned.  Must be       * @param bound the bound on the random number to be returned.  Must be
509       *        positive.       *        positive.
510       * @return a pseudorandom {@code long} value between zero       * @return a pseudorandom {@code long} value between zero
511       *         (inclusive) and the bound (exclusive).       *         (inclusive) and the bound (exclusive)
512       * @throws IllegalArgumentException if {@code bound} is less than zero       * @throws IllegalArgumentException if {@code bound} is less than zero
513       */       */
514      public long nextLong(long bound) {      public long nextLong(long bound) {
# Line 535  Line 535 
535       * @param origin the least value returned       * @param origin the least value returned
536       * @param bound the upper bound (exclusive)       * @param bound the upper bound (exclusive)
537       * @return a pseudorandom {@code long} value between the origin       * @return a pseudorandom {@code long} value between the origin
538       *         (inclusive) and the bound (exclusive).       *         (inclusive) and the bound (exclusive)
539       * @throws IllegalArgumentException if {@code origin} is greater than       * @throws IllegalArgumentException if {@code origin} is greater than
540       *         or equal to {@code bound}       *         or equal to {@code bound}
541       */       */
# Line 563  Line 563 
563       * @param bound the bound on the random number to be returned.  Must be       * @param bound the bound on the random number to be returned.  Must be
564       *        positive.       *        positive.
565       * @return a pseudorandom {@code double} value between zero       * @return a pseudorandom {@code double} value between zero
566       *         (inclusive) and the bound (exclusive).       *         (inclusive) and the bound (exclusive)
567       * @throws IllegalArgumentException if {@code bound} is less than zero       * @throws IllegalArgumentException if {@code bound} is less than zero
568       */       */
569      public double nextDouble(double bound) {      public double nextDouble(double bound) {
# Line 581  Line 581 
581       * @param origin the least value returned       * @param origin the least value returned
582       * @param bound the upper bound       * @param bound the upper bound
583       * @return a pseudorandom {@code double} value between the origin       * @return a pseudorandom {@code double} value between the origin
584       *         (inclusive) and the bound (exclusive).       *         (inclusive) and the bound (exclusive)
585       * @throws IllegalArgumentException if {@code origin} is greater than       * @throws IllegalArgumentException if {@code origin} is greater than
586       *         or equal to {@code bound}       *         or equal to {@code bound}
587       */       */
# Line 614  Line 614 
614    
615      /**      /**
616       * Returns an effectively unlimited stream of pseudorandom {@code int}       * Returns an effectively unlimited stream of pseudorandom {@code int}
617       * values       * values.
618       *       *
619       * @implNote This method is implemented to be equivalent to {@code       * @implNote This method is implemented to be equivalent to {@code
620       * ints(Long.MAX_VALUE)}.       * ints(Long.MAX_VALUE)}.
# Line 637  Line 637 
637       * @param randomNumberOrigin the origin of each random value       * @param randomNumberOrigin the origin of each random value
638       * @param randomNumberBound the bound of each random value       * @param randomNumberBound the bound of each random value
639       * @return a stream of pseudorandom {@code int} values,       * @return a stream of pseudorandom {@code int} values,
640       *         each with the given origin and bound.       *         each with the given origin and bound
641       * @throws IllegalArgumentException if {@code streamSize} is       * @throws IllegalArgumentException if {@code streamSize} is
642       *         less than zero, or {@code randomNumberOrigin}       *         less than zero, or {@code randomNumberOrigin}
643       *         is greater than or equal to {@code randomNumberBound}       *         is greater than or equal to {@code randomNumberBound}
# Line 664  Line 664 
664       * @param randomNumberOrigin the origin of each random value       * @param randomNumberOrigin the origin of each random value
665       * @param randomNumberBound the bound of each random value       * @param randomNumberBound the bound of each random value
666       * @return a stream of pseudorandom {@code int} values,       * @return a stream of pseudorandom {@code int} values,
667       *         each with the given origin and bound.       *         each with the given origin and bound
668       * @throws IllegalArgumentException if {@code randomNumberOrigin}       * @throws IllegalArgumentException if {@code randomNumberOrigin}
669       *         is greater than or equal to {@code randomNumberBound}       *         is greater than or equal to {@code randomNumberBound}
670       */       */
# Line 720  Line 720 
720       * @param randomNumberOrigin the origin of each random value       * @param randomNumberOrigin the origin of each random value
721       * @param randomNumberBound the bound of each random value       * @param randomNumberBound the bound of each random value
722       * @return a stream of pseudorandom {@code long} values,       * @return a stream of pseudorandom {@code long} values,
723       *         each with the given origin and bound.       *         each with the given origin and bound
724       * @throws IllegalArgumentException if {@code streamSize} is       * @throws IllegalArgumentException if {@code streamSize} is
725       *         less than zero, or {@code randomNumberOrigin}       *         less than zero, or {@code randomNumberOrigin}
726       *         is greater than or equal to {@code randomNumberBound}       *         is greater than or equal to {@code randomNumberBound}
# Line 747  Line 747 
747       * @param randomNumberOrigin the origin of each random value       * @param randomNumberOrigin the origin of each random value
748       * @param randomNumberBound the bound of each random value       * @param randomNumberBound the bound of each random value
749       * @return a stream of pseudorandom {@code long} values,       * @return a stream of pseudorandom {@code long} values,
750       *         each with the given origin and bound.       *         each with the given origin and bound
751       * @throws IllegalArgumentException if {@code randomNumberOrigin}       * @throws IllegalArgumentException if {@code randomNumberOrigin}
752       *         is greater than or equal to {@code randomNumberBound}       *         is greater than or equal to {@code randomNumberBound}
753       */       */
# Line 805  Line 805 
805       * @param randomNumberOrigin the origin of each random value       * @param randomNumberOrigin the origin of each random value
806       * @param randomNumberBound the bound of each random value       * @param randomNumberBound the bound of each random value
807       * @return a stream of pseudorandom {@code double} values,       * @return a stream of pseudorandom {@code double} values,
808       * each with the given origin and bound.       * each with the given origin and bound
809       * @throws IllegalArgumentException if {@code streamSize} is       * @throws IllegalArgumentException if {@code streamSize} is
810       * less than zero.       * less than zero
811       * @throws IllegalArgumentException if {@code randomNumberOrigin}       * @throws IllegalArgumentException if {@code randomNumberOrigin}
812       *         is greater than or equal to {@code randomNumberBound}       *         is greater than or equal to {@code randomNumberBound}
813       */       */
# Line 833  Line 833 
833       * @param randomNumberOrigin the origin of each random value       * @param randomNumberOrigin the origin of each random value
834       * @param randomNumberBound the bound of each random value       * @param randomNumberBound the bound of each random value
835       * @return a stream of pseudorandom {@code double} values,       * @return a stream of pseudorandom {@code double} values,
836       * each with the given origin and bound.       * each with the given origin and bound
837       * @throws IllegalArgumentException if {@code randomNumberOrigin}       * @throws IllegalArgumentException if {@code randomNumberOrigin}
838       *         is greater than or equal to {@code randomNumberBound}       *         is greater than or equal to {@code randomNumberBound}
839       */       */

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8