mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-06 08:00:18 +07:00
GitOrigin-RevId: 0890d9367b880820af1125b0cb292916b29c238c
9 lines
289 B
Java
9 lines
289 B
Java
// "Collapse loop with stream 'anyMatch()/noneMatch()/allMatch()'" "true-preview"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testAssignment(List<String> data) {
|
|
String found = data.stream().map(String::trim).anyMatch(trimmed -> !trimmed.isEmpty()) ? "yes" : "no";
|
|
}
|
|
} |