Given the documentation for java.util.Map:
V getOrDefault(Object key, V defaultValue)
V computeIfAbsent(K key, Function<? super K, ? extends V> mappingFunction)