mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-09 20:35:34 +07:00
16 lines
355 B
Java
16 lines
355 B
Java
// "Replace with anyMatch()" "true"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
public void testAssignment(List<String> data) {
|
|
boolean found = false;
|
|
if(Math.random() > 0.5) {
|
|
found = true;
|
|
} else {
|
|
if (data.stream().map(String::trim).anyMatch(trimmed -> !trimmed.isEmpty())) {
|
|
found = true;
|
|
}
|
|
}
|
|
}
|
|
} |