mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-21 22:11:40 +07:00
10 lines
256 B
Java
10 lines
256 B
Java
// "Use 'computeIfAbsent' method with functional argument" "true-preview"
|
|
|
|
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);
|
|
}
|
|
} |