putIfAbsent

abstract V putIfAbsent(K key, V provider)

If the specified key is not already associated with a provider,associate it with the given value and return {@code null}, else return the current value.

Throws

If the key or the provider is null.

Sources

jvm source
Link copied to clipboard