mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-07 06:01:00 +07:00
GitOrigin-RevId: c4db6507c258e5611f6d47b9373a0c2531802345
12 lines
325 B
Java
12 lines
325 B
Java
// "Collapse loop with stream 'collect()'" "true-preview"
|
|
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Main {
|
|
private Map<Integer, List<String>> test(String... list) {
|
|
Map<Integer, List<String>> map = Arrays.stream(list).collect(Collectors.groupingBy(String::length));
|
|
return map;
|
|
}
|
|
}
|