5 |
|
*/ |
6 |
|
|
7 |
|
package extra166y; |
8 |
+ |
|
9 |
|
import jsr166y.*; |
10 |
|
import static extra166y.Ops.*; |
11 |
|
import java.util.*; |
527 |
|
* 2, 3}, and the reducer operation adds numbers, then after |
528 |
|
* invocation of this method, the contents would be {@code 0, 1, |
529 |
|
* 3} (that is, {@code 0, 0+1, 0+1+2}, and the return value |
530 |
< |
* would be 6 (that is, {@code 1+2+3}). |
530 |
> |
* would be 6 (that is, {@code 1+2+3}). |
531 |
|
* @param reducer the reducer |
532 |
|
* @param base the result for an empty array |
533 |
|
* @return the total reduction |
1353 |
|
return a; |
1354 |
|
} |
1355 |
|
|
1356 |
< |
public <V> V[] toArray(V a[]) { |
1356 |
> |
public <V> V[] toArray(V[] a) { |
1357 |
|
int len = fence; |
1358 |
|
if (a.length < len) { |
1359 |
|
Class elementType = a.getClass().getComponentType(); |