mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 18:58:31 +07:00
15 lines
365 B
Java
15 lines
365 B
Java
// "Replace Stream API chain with loop" "true"
|
|
|
|
import java.util.List;
|
|
import java.util.function.Predicate;
|
|
|
|
public class Main {
|
|
static Predicate<String> nonEmpty = s -> s != null && !s.isEmpty();
|
|
|
|
private static long test(List<String> strings) {
|
|
return strings.stream().filter(nonEmpty).cou<caret>nt();
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
}
|
|
} |