mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
14 lines
377 B
Java
14 lines
377 B
Java
// "Collapse loop with stream 'collect()'" "true-preview"
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.stream.IntStream;
|
|
|
|
import static java.util.stream.Collectors.*;
|
|
|
|
public class Main<T> {
|
|
public static List<String> test() {
|
|
List<String> strings = IntStream.range(0, 10).<String>mapToObj(x -> null).collect(toList());
|
|
return strings;
|
|
}
|
|
} |