mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
14 lines
384 B
Java
14 lines
384 B
Java
// "Replace iteration with bulk 'List.replaceAll' call" "true"
|
|
|
|
import java.util.*;
|
|
import java.util.function.UnaryOperator;
|
|
|
|
public class Main {
|
|
static class MyList extends ArrayList<String> {
|
|
public void myReplaceAll(UnaryOperator<String> operator) {
|
|
for (int i = 0; i < super.size(); i++) {
|
|
super.set<caret>(i, operator.apply(super.get(i)));
|
|
}
|
|
}
|
|
}
|
|
} |