mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-31 11:20:55 +07:00
9 lines
280 B
Java
9 lines
280 B
Java
// "Collapse loop with stream 'anyMatch()'" "true-preview"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public boolean testPrimitiveMap(List<String> data) {
|
|
return data.stream().filter(str -> str.startsWith("xyz")).mapToInt(String::length).anyMatch(len -> len > 10);
|
|
}
|
|
} |