--- jsr166/src/extra166y/ParallelArray.java 2013/01/16 00:51:11 1.9 +++ jsr166/src/extra166y/ParallelArray.java 2013/11/04 00:00:39 1.17 @@ -133,7 +133,7 @@ import java.lang.reflect.Array; * public boolean op(Student s) { return s.credits > 90; } * } * static final IsSenior isSenior = new IsSenior(); - * static final class GpaField implements ObjectToDouble<Student> { + * static final class GpaField implements ObjectToDouble<Student> { * public double op(Student s) { return s.gpa; } * } * static final GpaField gpaField = new GpaField(); @@ -509,7 +509,7 @@ public class ParallelArray extends Ab * the given reducer. For example, if the contents are the numbers * {@code 1, 2, 3}, and the reducer operation adds numbers, then * after invocation of this method, the contents would be {@code 1, - * 3, 6} (that is, {@code 1, 1+2, 1+2+3}); + * 3, 6} (that is, {@code 1, 1+2, 1+2+3}). * @param reducer the reducer * @param base the result for an empty array * @return this (to simplify use in expressions) @@ -526,13 +526,13 @@ public class ParallelArray extends Ab * 2, 3}, and the reducer operation adds numbers, then after * invocation of this method, the contents would be {@code 0, 1, * 3} (that is, {@code 0, 0+1, 0+1+2}, and the return value - * would be 6 (that is, {@code 1+2+3}); + * would be 6 (that is, {@code 1+2+3}). * @param reducer the reducer * @param base the result for an empty array * @return the total reduction */ public T precumulate(Reducer reducer, T base) { - return (T)(super.precumulate(reducer, base)); + return super.precumulate(reducer, base); } /** @@ -551,8 +551,8 @@ public class ParallelArray extends Ab * Sorts the array, assuming all elements are Comparable. Unlike * Arrays.sort, this sort does not guarantee that elements * with equal keys maintain their relative position in the array. - * @throws ClassCastException if any element is not Comparable * @return this (to simplify use in expressions) + * @throws ClassCastException if any element is not Comparable */ public ParallelArray sort() { super.sort(); @@ -755,7 +755,7 @@ public class ParallelArray extends Ab * @param op the op * @return operation prefix */ - public ParallelArrayWithMapping withMapping + public ParallelArrayWithMapping withMapping (Op op) { return super.withMapping(op); } @@ -1037,7 +1037,7 @@ public class ParallelArray extends Ab public T[] getArray() { return array; } /** - * Equivalent to {@code asList().toString()} + * Equivalent to {@code asList().toString()}. * @return a string representation */ public String toString() { @@ -1352,7 +1352,7 @@ public class ParallelArray extends Ab return a; } - public V[] toArray(V a[]) { + public V[] toArray(V[] a) { int len = fence; if (a.length < len) { Class elementType = a.getClass().getComponentType();