mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-26 20:50:54 +07:00
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);
|
|
}
|
|
} |