mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 17:20:54 +07:00
12 lines
352 B
Java
12 lines
352 B
Java
// "Replace Stream API chain with loop" "true-preview"
|
|
|
|
import java.util.List;
|
|
import java.util.function.Function;
|
|
import java.util.stream.Collectors;
|
|
|
|
public class Main {
|
|
public void test(List<String> list) {
|
|
System.out.println(list.stream().map(list.size() < 10 ? String::trim : Function.identity()).colle<caret>ct(Collectors.toList()));
|
|
}
|
|
}
|