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

Comparing jsr166/src/extra166y/ParallelArrayWithMapping.java (file contents):
Revision 1.4 by jsr166, Wed Jul 4 20:13:53 2012 UTC vs.
Revision 1.5 by jsr166, Sat Dec 29 23:55:19 2012 UTC

# Line 24 | Line 24 | public abstract class ParallelArrayWithM
24      }
25  
26      /**
27 <     * Applies the given procedure to elements
27 >     * Applies the given procedure to elements.
28       * @param procedure the procedure
29       */
30      public void apply(Procedure<? super U> procedure) {
# Line 32 | Line 32 | public abstract class ParallelArrayWithM
32      }
33  
34      /**
35 <     * Returns reduction of elements
35 >     * Returns reduction of elements.
36       * @param reducer the reducer
37       * @param base the result for an empty array
38       * @return reduction
# Line 47 | Line 47 | public abstract class ParallelArrayWithM
47      /**
48       * Returns some element matching bound and filter
49       * constraints, or null if none.
50 <     * @return an element, or null if none.
50 >     * @return an element, or null if none
51       */
52      public U any() {
53          int i = anyIndex();
# Line 55 | Line 55 | public abstract class ParallelArrayWithM
55      }
56  
57      /**
58 <     * Returns the minimum element, or null if empty
58 >     * Returns the minimum element, or null if empty.
59       * @param comparator the comparator
60       * @return minimum element, or null if empty
61       */
# Line 65 | Line 65 | public abstract class ParallelArrayWithM
65  
66      /**
67       * Returns the minimum element, or null if empty,
68 <     * assuming that all elements are Comparables
68 >     * assuming that all elements are Comparables.
69       * @return minimum element, or null if empty
70 <     * @throws ClassCastException if any element is not Comparable.
70 >     * @throws ClassCastException if any element is not Comparable
71       */
72      public U min() {
73          return reduce((Reducer<U>)(CommonOps.castedMinReducer()), null);
74      }
75  
76      /**
77 <     * Returns the maximum element, or null if empty
77 >     * Returns the maximum element, or null if empty.
78       * @param comparator the comparator
79       * @return maximum element, or null if empty
80       */
# Line 83 | Line 83 | public abstract class ParallelArrayWithM
83      }
84  
85      /**
86 <     * Returns the maximum element, or null if empty
87 <     * assuming that all elements are Comparables
86 >     * Returns the maximum element, or null if empty,
87 >     * assuming that all elements are Comparables.
88       * @return maximum element, or null if empty
89 <     * @throws ClassCastException if any element is not Comparable.
89 >     * @throws ClassCastException if any element is not Comparable
90       */
91      public U max() {
92          return reduce((Reducer<U>)(CommonOps.castedMaxReducer()), null);
# Line 97 | Line 97 | public abstract class ParallelArrayWithM
97       * to locate minimum and maximum elements.
98       * @param comparator the comparator to use for
99       * locating minimum and maximum elements
100 <     * @return the summary.
100 >     * @return the summary
101       */
102      public ParallelArray.SummaryStatistics<U> summary
103          (Comparator<? super U> comparator) {
# Line 109 | Line 109 | public abstract class ParallelArrayWithM
109  
110      /**
111       * Returns summary statistics, assuming that all elements are
112 <     * Comparables
113 <     * @return the summary.
112 >     * Comparables.
113 >     * @return the summary
114       */
115      public ParallelArray.SummaryStatistics<U> summary() {
116          return summary((Comparator<? super U>)(CommonOps.castedComparator()));
117      }
118  
119      /**
120 <     * Returns a new ParallelArray holding elements
120 >     * Returns a new ParallelArray holding elements.
121       * @return a new ParallelArray holding elements
122       */
123      public ParallelArray<U> all() {
# Line 126 | Line 126 | public abstract class ParallelArrayWithM
126  
127      /**
128       * Returns a new ParallelArray with the given element type
129 <     * holding elements
129 >     * holding elements.
130       * @param elementType the type of the elements
131       * @return a new ParallelArray holding elements
132       */
# Line 137 | Line 137 | public abstract class ParallelArrayWithM
137      /**
138       * Returns an operation prefix that causes a method to operate
139       * on mapped elements of the array using the given op
140 <     * applied to current op's results
140 >     * applied to current op's results.
141       * @param op the op
142       * @return operation prefix
143       */
# Line 147 | Line 147 | public abstract class ParallelArrayWithM
147      /**
148       * Returns an operation prefix that causes a method to operate
149       * on mapped elements of the array using the given op
150 <     * applied to current op's results
150 >     * applied to current op's results.
151       * @param op the op
152       * @return operation prefix
153       */
# Line 157 | Line 157 | public abstract class ParallelArrayWithM
157      /**
158       * Returns an operation prefix that causes a method to operate
159       * on mapped elements of the array using the given op
160 <     * applied to current op's results
160 >     * applied to current op's results.
161       * @param op the op
162       * @return operation prefix
163       */
# Line 171 | Line 171 | public abstract class ParallelArrayWithM
171       * @param other the other array
172       * @return operation prefix
173       * @throws IllegalArgumentException if other array is a
174 <     * filtered view (all filters must precede all mappings).
174 >     * filtered view (all filters must precede all mappings)
175       */
176      public <V,W,X> ParallelArrayWithMapping<T,W> withMapping
177          (BinaryOp<? super U, ? super V, ? extends W> combiner,
# Line 188 | Line 188 | public abstract class ParallelArrayWithM
188       * @param other the other array
189       * @return operation prefix
190       * @throws IllegalArgumentException if other array is a
191 <     * filtered view (all filters must precede all mappings).
191 >     * filtered view (all filters must precede all mappings)
192       */
193      public <V> ParallelArrayWithMapping<T,V> withMapping
194          (ObjectAndDoubleToObject<? super U, ? extends V> combiner,
# Line 205 | Line 205 | public abstract class ParallelArrayWithM
205       * @param other the other array
206       * @return operation prefix
207       * @throws IllegalArgumentException if other array is a
208 <     * filtered view (all filters must precede all mappings).
208 >     * filtered view (all filters must precede all mappings)
209       */
210      public <V> ParallelArrayWithMapping<T,V> withMapping
211          (ObjectAndLongToObject<? super U, ? extends V> combiner,
# Line 222 | Line 222 | public abstract class ParallelArrayWithM
222       * @param other the other array
223       * @return operation prefix
224       * @throws IllegalArgumentException if other array is a
225 <     * filtered view (all filters must precede all mappings).
225 >     * filtered view (all filters must precede all mappings)
226       */
227      public <V,W> ParallelArrayWithDoubleMapping<T> withMapping
228          (ObjectAndObjectToDouble<? super U, ? super V> combiner,
# Line 239 | Line 239 | public abstract class ParallelArrayWithM
239       * @param other the other array
240       * @return operation prefix
241       * @throws IllegalArgumentException if other array is a
242 <     * filtered view (all filters must precede all mappings).
242 >     * filtered view (all filters must precede all mappings)
243       */
244      public ParallelArrayWithDoubleMapping<T> withMapping
245          (ObjectAndDoubleToDouble<? super U> combiner,
# Line 256 | Line 256 | public abstract class ParallelArrayWithM
256       * @param other the other array
257       * @return operation prefix
258       * @throws IllegalArgumentException if other array is a
259 <     * filtered view (all filters must precede all mappings).
259 >     * filtered view (all filters must precede all mappings)
260       */
261      public ParallelArrayWithDoubleMapping<T> withMapping
262          (ObjectAndLongToDouble<? super U> combiner,
# Line 273 | Line 273 | public abstract class ParallelArrayWithM
273       * @param other the other array
274       * @return operation prefix
275       * @throws IllegalArgumentException if other array is a
276 <     * filtered view (all filters must precede all mappings).
276 >     * filtered view (all filters must precede all mappings)
277       */
278      public <V,W> ParallelArrayWithLongMapping<T> withMapping
279          (ObjectAndObjectToLong<? super U, ? super V> combiner,
# Line 290 | Line 290 | public abstract class ParallelArrayWithM
290       * @param other the other array
291       * @return operation prefix
292       * @throws IllegalArgumentException if other array is a
293 <     * filtered view (all filters must precede all mappings).
293 >     * filtered view (all filters must precede all mappings)
294       */
295      public ParallelArrayWithLongMapping<T> withMapping
296          (ObjectAndDoubleToLong<? super U> combiner,
# Line 307 | Line 307 | public abstract class ParallelArrayWithM
307       * @param other the other array
308       * @return operation prefix
309       * @throws IllegalArgumentException if other array is a
310 <     * filtered view (all filters must precede all mappings).
310 >     * filtered view (all filters must precede all mappings)
311       */
312      public ParallelArrayWithLongMapping<T> withMapping
313          (ObjectAndLongToLong<? super U> combiner,
# Line 356 | Line 356 | public abstract class ParallelArrayWithM
356      /**
357       * Returns an Iterable view to sequentially step through mapped
358       * elements also obeying bound and filter constraints, without
359 <     * performing computations to evaluate them in parallel
359 >     * performing computations to evaluate them in parallel.
360       * @return the Iterable view
361       */
362      public Iterable<U> sequentially() {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines