mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 05:09:37 +07:00
16 lines
386 B
Java
16 lines
386 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.Arrays;
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
private static void test(List<String> list) {
|
|
if(list.stream().filter(x -> x != null).an<caret>yMatch(x -> x.startsWith("x"))) {
|
|
System.out.println("Ok!");
|
|
}
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
test(Arrays.asList("a", "b", "xyz"));
|
|
}
|
|
} |