mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
13 lines
320 B
Java
13 lines
320 B
Java
// "Collapse loop with stream 'forEach()'" "true-preview"
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Objects;
|
|
|
|
class Sample {
|
|
List<String> foo = new ArrayList<>();
|
|
String foo(){
|
|
((List<String>) foo).stream().filter(Objects::isNull).forEach(System.out::println);
|
|
return null;
|
|
}
|
|
}
|