1598 |
|
replaceAllRange(operator, 0, size); |
1599 |
|
} |
1600 |
|
|
1601 |
< |
private void replaceAllRange(UnaryOperator<E> operator, int from, int to) { |
1601 |
> |
private void replaceAllRange(UnaryOperator<E> operator, int i, int end) { |
1602 |
|
Objects.requireNonNull(operator); |
1603 |
|
final int expectedModCount = modCount; |
1604 |
|
final Object[] es = elementData; |
1605 |
< |
for (int i = from; modCount == expectedModCount && i < to; i++) |
1605 |
> |
for (; modCount == expectedModCount && i < end; i++) |
1606 |
|
es[i] = operator.apply(elementAt(es, i)); |
1607 |
|
if (modCount != expectedModCount) |
1608 |
|
throw new ConcurrentModificationException(); |