mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-02 14:20:55 +07:00
10 lines
289 B
Java
10 lines
289 B
Java
// "Collapse loop with stream 'allMatch()'" "true-preview"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
boolean find(List<String> data, boolean other, boolean third) {
|
|
return data.stream().map(String::trim).allMatch(trimmed -> trimmed.startsWith("xyz")) && (other || third);
|
|
}
|
|
}
|