mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-25 10:51:06 +07:00
11 lines
317 B
Java
11 lines
317 B
Java
// "Collapse loop with stream 'anyMatch()/noneMatch()/allMatch()'" "true-preview"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testAssignment(List<String> data) {
|
|
if (data.stream().map(String::trim).anyMatch(trimmed -> !trimmed.isEmpty())) {
|
|
System.out.println("Found!!!");
|
|
}
|
|
}
|
|
} |