mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
16 lines
377 B
Java
16 lines
377 B
Java
// "Fix all 'Loop can be replaced with 'List.replaceAll()'' problems in file" "true"
|
|
import java.util.List;
|
|
|
|
class Main {
|
|
void modifyStrings1(List<String> strings) {
|
|
strings.replaceAll(this::modifyString);
|
|
}
|
|
|
|
void modifyStrings2(List<String> strings) {
|
|
strings.replaceAll(String::trim);
|
|
}
|
|
|
|
String modifyString(String str) {
|
|
return str.repeat(2);
|
|
}
|
|
} |