mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 11:36:16 +07:00
IDEA-163050 "Replace inefficient Stream API call chains ending with count()": highlighting
13 lines
291 B
Java
13 lines
291 B
Java
// "Replace Stream.flatMap().count() with Stream.mapToLong().sum()" "true"
|
|
|
|
import java.util.List;
|
|
|
|
public class Main {
|
|
private String s;
|
|
|
|
public Main(List<List<String>> s) {
|
|
long count = s.stream().flatMap((strings) -> {
|
|
return (strings.stream());
|
|
}).cou<caret>nt();
|
|
}
|
|
} |