mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-31 11:20:55 +07:00
11 lines
299 B
Java
11 lines
299 B
Java
// "Collapse loop with stream 'anyMatch()'" "true-preview"
|
|
|
|
import java.util.*;
|
|
|
|
public class Main {
|
|
public List<? extends CharSequence> getList() {return Arrays.asList("a");}
|
|
public boolean test() {
|
|
return getList().stream().map(CharSequence::toString).anyMatch(s -> !s.isEmpty());
|
|
}
|
|
}
|