mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-06-18 17:16:50 +07:00
391bda1c4b
- support the new Go colors GitOrigin-RevId: 4ecd779a6ceae3f36b60c6656d9ff819fe844f89
10 lines
248 B
Java
10 lines
248 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.putIfAbsent(key, new ArrayL<caret>ist<>());
|
|
map.get(key).add(0);
|
|
}
|
|
} |