mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-25 19:21:16 +07:00
9 lines
275 B
Java
9 lines
275 B
Java
// "Collapse loop with stream 'anyMatch()/noneMatch()/allMatch()'" "true-preview"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testAssignment(List<String> data) {
|
|
boolean found = data.stream().map(String::trim).anyMatch(trimmed -> !trimmed.isEmpty());
|
|
}
|
|
} |