mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-20 04:14:34 +07:00
7e1064ea3c
GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
25 lines
663 B
Java
25 lines
663 B
Java
// "Replace Stream API chain with loop" "true-preview"
|
|
|
|
import java.util.List;
|
|
|
|
import static java.util.Arrays.asList;
|
|
|
|
public class Main {
|
|
public static boolean test(List<List<String>> list) {
|
|
for (List<String> x : list) {
|
|
if (x != null) {
|
|
for (String str : x) {
|
|
if (str.startsWith("a")) {
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(test(asList(asList(), asList("a"), asList("b", "c"))));
|
|
System.out.println(test(asList(asList(), asList("d"), asList("b", "c"))));
|
|
}
|
|
} |