mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-18 20:17:53 +07:00
391bda1c4b
- support the new Go colors GitOrigin-RevId: 4ecd779a6ceae3f36b60c6656d9ff819fe844f89
10 lines
250 B
Java
10 lines
250 B
Java
// "Use 'computeIfAbsent' method with functional argument" "true"
|
|
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
public void test(Map<String, List<Integer>> map, String key) {
|
|
map.computeIfAbsent(key, k -> new ArrayList<>());
|
|
map.get(key).add(0);
|
|
}
|
|
} |