mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-20 14:00:49 +07:00
86f0b63857
GitOrigin-RevId: c4db6507c258e5611f6d47b9373a0c2531802345
9 lines
300 B
Java
9 lines
300 B
Java
// "Collapse loop with stream 'toArray()'" "true-preview"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public Integer[] testNestedAnyMatch(List<List<String>> data) {
|
|
return data.stream().filter(list -> list.stream().anyMatch(str -> !str.isEmpty())).map(List::size).toArray(Integer[]::new);
|
|
}
|
|
} |