JavaMapputIfAbsent
entrySet

putIfAbsentMap

merge

Inserts the value only if the key is not already present.

Syntax

map.putIfAbsent(key, value)