mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
10 lines
289 B
Java
10 lines
289 B
Java
// "Collapse loop with stream 'anyMatch()'" "true-preview"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
boolean find(List<String> data, boolean other, boolean third) {
|
|
return data.stream().map(String::trim).anyMatch(trimmed -> trimmed.startsWith("xyz")) || (other || third);
|
|
}
|
|
}
|