mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-07 17:02:37 +07:00
15 lines
378 B
Java
15 lines
378 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Test {
|
|
static void test(List<String> list) {
|
|
Map<Integer, Double> map4 = new HashMap<>();
|
|
for (String s : list) {
|
|
map4.merge(s.length(), (double) s.length(), Double::sum);
|
|
}
|
|
}
|
|
} |