mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-21 12:14:37 +07:00
# Conflicts: # CIDR/clion/src/com/jetbrains/cidr/cpp/toolchains/MSVC.java GitOrigin-RevId: f3593b526d1870f32b3f1451cab0c6a653e5beb5
10 lines
252 B
Java
10 lines
252 B
Java
// "Use 'computeIfAbsent' method with functional argument" "true"
|
|
|
|
import java.util.Map;
|
|
|
|
class Test {
|
|
public void test(Map<String, List<Integer>> map, String key) {
|
|
map.computeIfAbsent(key, k -> new ArrayList<>());
|
|
map.get(key).add(0);
|
|
}
|
|
} |