mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-29 09:20:37 +07:00
GitOrigin-RevId: 088ce28eb3b8cbbce9aa1cfc1b073fef2dab12ce
17 lines
390 B
Java
17 lines
390 B
Java
// "Replace with 'computeIfAbsent()' call" "true"
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class Main {
|
|
String k;
|
|
|
|
public void testMap(Map<String, List<String>> map, String value) {
|
|
List<String> list = map.get(this.k);
|
|
if(list == nul<caret>l) {
|
|
list = new ArrayList<>();
|
|
map.put(this.k, list);
|
|
}
|
|
list.add(value);
|
|
}
|
|
} |