--- jsr166/src/extra166y/ParallelArray.java 2012/10/21 06:14:11 1.5 +++ jsr166/src/extra166y/ParallelArray.java 2012/12/29 23:55:19 1.7 @@ -22,7 +22,7 @@ import java.lang.reflect.Array; * matching a predicate or ranges of indices, and to reduce * all elements into a single value such as a sum. * - *

A ParallelArray is constructed by allocating, using, or copying + *

A ParallelArray is constructed by allocating, using, or copying * an array, using one of the static factory methods {@link #create}, * {@link #createEmpty}, {@link #createUsingHandoff} and {@link * #createFromCopy}. Upon construction, the encapsulated array managed @@ -31,7 +31,7 @@ import java.lang.reflect.Array; * array, access by another thread of an element of a ParallelArray * while another operation is in progress has undefined effects. * - *

The ForkJoinPool used to construct a ParallelArray can be + *

The ForkJoinPool used to construct a ParallelArray can be * shared safely by other threads (and used in other * ParallelArrays). To avoid the overhead associated with creating * multiple executors, it is often a good idea to use the {@link @@ -67,7 +67,7 @@ import java.lang.reflect.Array; * significantly improving performance beyond that of the Long and * Double versions.) * - *

Most usages of ParallelArray involve sets of operations prefixed + *

Most usages of ParallelArray involve sets of operations prefixed * with range bounds, filters, and mappings (including mappings that * combine elements from other ParallelArrays), using * withBounds, withFilter, and withMapping, @@ -450,7 +450,7 @@ public class ParallelArray extends Ab * to locate minimum and maximum elements. * @param comparator the comparator to use for * locating minimum and maximum elements - * @return the summary. + * @return the summary */ public ParallelArray.SummaryStatistics summary (Comparator comparator) { @@ -459,15 +459,15 @@ public class ParallelArray extends Ab /** * Returns summary statistics, assuming that all elements are - * Comparables - * @return the summary. + * Comparables. + * @return the summary */ public ParallelArray.SummaryStatistics summary() { return super.summary(); } /** - * Returns the minimum element, or null if empty + * Returns the minimum element, or null if empty. * @param comparator the comparator * @return minimum element, or null if empty */ @@ -477,16 +477,16 @@ public class ParallelArray extends Ab /** * Returns the minimum element, or null if empty, - * assuming that all elements are Comparables + * assuming that all elements are Comparables. * @return minimum element, or null if empty - * @throws ClassCastException if any element is not Comparable. + * @throws ClassCastException if any element is not Comparable */ public T min() { return super.min(); } /** - * Returns the maximum element, or null if empty + * Returns the maximum element, or null if empty. * @param comparator the comparator * @return maximum element, or null if empty */ @@ -495,10 +495,10 @@ public class ParallelArray extends Ab } /** - * Returns the maximum element, or null if empty - * assuming that all elements are Comparables + * Returns the maximum element, or null if empty, + * assuming that all elements are Comparables. * @return maximum element, or null if empty - * @throws ClassCastException if any element is not Comparable. + * @throws ClassCastException if any element is not Comparable */ public T max() { return super.max(); @@ -551,7 +551,7 @@ 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. + * @throws ClassCastException if any element is not Comparable * @return this (to simplify use in expressions) */ public ParallelArray sort() { @@ -715,7 +715,7 @@ public class ParallelArray extends Ab /** * Returns an operation prefix that causes a method to operate * only on the elements of the array for which the given selector - * returns true + * returns true. * @param selector the selector * @return operation prefix */ @@ -727,7 +727,7 @@ public class ParallelArray extends Ab /** * Returns an operation prefix that causes a method to operate * only on elements for which the given binary selector returns - * true + * true. * @param selector the selector * @return operation prefix */ @@ -740,7 +740,7 @@ public class ParallelArray extends Ab /** * Returns an operation prefix that causes a method to operate * only on elements for which the given indexed selector returns - * true + * true. * @param selector the selector * @return operation prefix */ @@ -789,7 +789,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithMapping withMapping (BinaryOp combiner, @@ -804,7 +804,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithMapping withMapping (ObjectAndDoubleToObject combiner, @@ -819,7 +819,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithMapping withMapping (ObjectAndLongToObject combiner, @@ -834,7 +834,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithDoubleMapping withMapping (ObjectAndObjectToDouble combiner, @@ -849,7 +849,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithDoubleMapping withMapping (ObjectAndDoubleToDouble combiner, @@ -864,7 +864,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithDoubleMapping withMapping (ObjectAndLongToDouble combiner, @@ -879,7 +879,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithLongMapping withMapping (ObjectAndObjectToLong combiner, @@ -894,7 +894,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithLongMapping withMapping (ObjectAndDoubleToLong combiner, @@ -909,7 +909,7 @@ public class ParallelArray extends Ab * @param other the other array * @return operation prefix * @throws IllegalArgumentException if other array is a - * filtered view (all filters must precede all mappings). + * filtered view (all filters must precede all mappings) */ public ParallelArrayWithLongMapping withMapping (ObjectAndLongToLong combiner, @@ -965,7 +965,7 @@ public class ParallelArray extends Ab * support the remove operation. However, a full * ListIterator supporting add, remove, and set * operations is available via {@link #asList}. - * @return an iterator stepping through each element. + * @return an iterator stepping through each element */ public Iterator iterator() { return new ParallelArrayIterator(array, fence); @@ -1017,21 +1017,21 @@ public class ParallelArray extends Ab public int size() { return fence; } /** - * Returns the element of the array at the given index + * Returns the element of the array at the given index. * @param i the index * @return the element of the array at the given index */ public T get(int i) { return array[i]; } /** - * Sets the element of the array at the given index to the given value + * Sets the element of the array at the given index to the given value. * @param i the index * @param x the value */ public void set(int i, T x) { array[i] = x; } /** - * Returns the underlying array used for computations + * Returns the underlying array used for computations. * @return the array */ public T[] getArray() { return array; } @@ -1052,7 +1052,7 @@ public class ParallelArray extends Ab * than the length of the underlying array, causes computations to * ignore elements past the given limit. * @param newLimit the new upper bound - * @throws IllegalArgumentException if newLimit less than zero. + * @throws IllegalArgumentException if newLimit less than zero */ public final void setLimit(int newLimit) { if (newLimit < 0)