ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/extra166y/ParallelLongArray.java
(Generate patch)

Comparing jsr166/src/extra166y/ParallelLongArray.java (file contents):
Revision 1.10 by jsr166, Wed Jan 16 00:51:11 2013 UTC vs.
Revision 1.17 by jsr166, Thu Feb 26 06:53:34 2015 UTC

# Line 5 | Line 5
5   */
6  
7   package extra166y;
8 +
9   import jsr166y.*;
10   import static extra166y.Ops.*;
11   import java.util.*;
12   import java.util.concurrent.atomic.*;
12 import java.lang.reflect.Array;
13  
14   /**
15   * An array of longs supporting parallel operations.  This class
# Line 302 | Line 302 | public class ParallelLongArray extends A
302       * @param combiner the combiner
303       * @return this (to simplify use in expressions)
304       * @throws ArrayIndexOutOfBoundsException if other array has
305 <     * fewer elements than this array.
305 >     * fewer elements than this array
306       */
307      public ParallelLongArray replaceWithMapping(BinaryLongOp combiner,
308                                                  long[] other) {
# Line 403 | Line 403 | public class ParallelLongArray extends A
403       * the given reducer. For example, if the contents are the numbers
404       * {@code 1, 2, 3}, and the reducer operation adds numbers, then
405       * after invocation of this method, the contents would be {@code 1,
406 <     * 3, 6} (that is, {@code 1, 1+2, 1+2+3});
406 >     * 3, 6} (that is, {@code 1, 1+2, 1+2+3}).
407       * @param reducer the reducer
408       * @param base the result for an empty array
409       * @return this (to simplify use in expressions)
# Line 420 | Line 420 | public class ParallelLongArray extends A
420       * 2, 3}, and the reducer operation adds numbers, then after
421       * invocation of this method, the contents would be {@code 0, 1,
422       * 3} (that is, {@code 0, 0+1, 0+1+2}, and the return value
423 <     * would be 6 (that is, {@code  1+2+3});
423 >     * would be 6 (that is, {@code 1+2+3}).
424       * @param reducer the reducer
425       * @param base the result for an empty array
426       * @return the total reduction
# Line 445 | Line 445 | public class ParallelLongArray extends A
445       * Sorts the array, assuming all elements are Comparable. Unlike
446       * Arrays.sort, this sort does not guarantee that elements
447       * with equal keys maintain their relative position in the array.
448     * @throws ClassCastException if any element is not Comparable
448       * @return this (to simplify use in expressions)
449 +     * @throws ClassCastException if any element is not Comparable
450       */
451      public ParallelLongArray sort() {
452          super.sort();
# Line 909 | Line 909 | public class ParallelLongArray extends A
909      public void set(int i, long x) { array[i] = x; }
910  
911      /**
912 <     * Equivalent to {@code asList().toString()}
912 >     * Equivalent to {@code asList().toString()}.
913       * @return a string representation
914       */
915      public String toString() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines