mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 11:36:16 +07:00
New inspection along with Collection.stream().count() -> Collection.size() moved to separate file ReplaceInefficientStreamCountInspection
12 lines
286 B
Java
12 lines
286 B
Java
// "Replace Stream.flatMap().count() with Stream.mapToLong().sum()" "true"
|
|
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
private String s;
|
|
|
|
public Main(List<Map<String, String>> s) {
|
|
long count = s.stream().mapToLong(map -> map.values().size()).sum();
|
|
}
|
|
} |