--- jsr166/src/extra166y/ParallelDoubleArray.java 2011/12/05 04:08:47 1.3 +++ jsr166/src/extra166y/ParallelDoubleArray.java 2012/12/29 23:55:19 1.7 @@ -137,19 +137,19 @@ public class ParallelDoubleArray extends * mapped ParallelDoubleArray. */ public static interface SummaryStatistics { - /** Return the number of elements */ + /** Returns the number of elements */ public int size(); - /** Return the minimum element, or Double.MAX_VALUE if empty */ + /** Returns the minimum element, or Double.MAX_VALUE if empty */ public double min(); - /** Return the maximum element, or -Double.MAX_VALUE if empty */ + /** Returns the maximum element, or -Double.MAX_VALUE if empty */ public double max(); - /** Return the index of the minimum element, or -1 if empty */ + /** Returns the index of the minimum element, or -1 if empty */ public int indexOfMin(); - /** Return the index of the maximum element, or -1 if empty */ + /** Returns the index of the maximum element, or -1 if empty */ public int indexOfMax(); - /** Return the sum of all elements */ + /** Returns the sum of all elements */ public double sum(); - /** Return the arithmetic average of all elements */ + /** Returns the arithmetic average of all elements */ public double average(); } @@ -310,7 +310,7 @@ public class ParallelDoubleArray extends * 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 ParallelDoubleArray.SummaryStatistics summary (DoubleComparator comparator) { @@ -318,15 +318,15 @@ public class ParallelDoubleArray extends } /** - * Returns summary statistics, using natural comparator - * @return the summary. + * Returns summary statistics, using natural comparator. + * @return the summary */ public ParallelDoubleArray.SummaryStatistics summary() { return super.summary(); } /** - * Returns the minimum element, or Double.MAX_VALUE if empty + * Returns the minimum element, or Double.MAX_VALUE if empty. * @param comparator the comparator * @return minimum element, or Double.MAX_VALUE if empty */ @@ -335,7 +335,7 @@ public class ParallelDoubleArray extends } /** - * Returns the minimum element, or Double.MAX_VALUE if empty, + * Returns the minimum element, or Double.MAX_VALUE if empty. * @return minimum element, or Double.MAX_VALUE if empty */ public double min() { @@ -343,7 +343,7 @@ public class ParallelDoubleArray extends } /** - * Returns the maximum element, or -Double.MAX_VALUE if empty + * Returns the maximum element, or -Double.MAX_VALUE if empty. * @param comparator the comparator * @return maximum element, or -Double.MAX_VALUE if empty */ @@ -352,7 +352,7 @@ public class ParallelDoubleArray extends } /** - * Returns the maximum element, or -Double.MAX_VALUE if empty + * Returns the maximum element, or -Double.MAX_VALUE if empty. * @return maximum element, or -Double.MAX_VALUE if empty */ public double max() { @@ -406,7 +406,7 @@ public class ParallelDoubleArray extends * 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 ParallelDoubleArray sort() { @@ -502,6 +502,7 @@ public class ParallelDoubleArray extends removeSlotsAt(f.offset, fence); return this; } + /** * Returns true if all elements at the same relative positions * of this and other array are equal. @@ -514,7 +515,7 @@ public class ParallelDoubleArray extends } /** - * Returns the sum of elements + * Returns the sum of elements. * @return the sum of elements */ public double sum() { @@ -522,7 +523,7 @@ public class ParallelDoubleArray extends } /** - * Replaces each element with the running sum + * Replaces each element with the running sum. * @return this (to simplify use in expressions) */ public ParallelDoubleArray cumulateSum() { @@ -531,7 +532,7 @@ public class ParallelDoubleArray extends } /** - * Replaces each element with its prefix sum + * Replaces each element with its prefix sum. * @return the total sum */ public double precumulateSum() { @@ -554,7 +555,7 @@ public class ParallelDoubleArray extends /** * 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 */ @@ -565,7 +566,7 @@ public class ParallelDoubleArray extends /** * 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 */ @@ -578,7 +579,7 @@ public class ParallelDoubleArray extends /** * 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 */ @@ -625,7 +626,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithMapping withMapping (DoubleAndObjectToObject combiner, @@ -640,7 +641,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithMapping withMapping (DoubleAndDoubleToObject combiner, @@ -655,7 +656,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithMapping withMapping (DoubleAndLongToObject combiner, @@ -670,7 +671,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithDoubleMapping withMapping (DoubleAndObjectToDouble combiner, @@ -685,7 +686,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithDoubleMapping withMapping (BinaryDoubleOp combiner, @@ -700,7 +701,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithDoubleMapping withMapping (DoubleAndLongToDouble combiner, @@ -715,7 +716,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithLongMapping withMapping (DoubleAndObjectToLong combiner, @@ -730,7 +731,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithLongMapping withMapping (DoubleAndDoubleToLong combiner, @@ -745,7 +746,7 @@ public class ParallelDoubleArray extends * @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 ParallelDoubleArrayWithLongMapping withMapping (DoubleAndLongToLong combiner, @@ -798,7 +799,7 @@ public class ParallelDoubleArray extends * 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 ParallelDoubleArrayIterator(array, fence); @@ -885,7 +886,7 @@ public class ParallelDoubleArray extends * 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) @@ -922,7 +923,7 @@ public class ParallelDoubleArray extends } /** - * Make len slots available at index + * Makes len slots available at index. */ final void insertSlotsAt(int index, int len) { if (len <= 0) @@ -1164,4 +1165,3 @@ public class ParallelDoubleArray extends } } -