522 |
|
sum[0] = 0; |
523 |
|
v.removeIf(n -> { sum[0] += n; return false; }); |
524 |
|
check.sum(sum[0]);}}}, |
525 |
+ |
new Job("ArrayList subList .removeIf") { |
526 |
+ |
public void work() throws Throwable { |
527 |
+ |
int[] sum = new int[1]; |
528 |
+ |
List<Integer> sl = asSubList(al); |
529 |
+ |
for (int i = 0; i < iterations; i++) { |
530 |
+ |
sum[0] = 0; |
531 |
+ |
sl.removeIf(n -> { sum[0] += n; return false; }); |
532 |
+ |
check.sum(sum[0]);}}}, |
533 |
|
new Job("ArrayList subList get loop") { |
534 |
|
public void work() throws Throwable { |
535 |
|
List<Integer> sl = asSubList(al); |