All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.infinicast.ConcurrentHashmapExtensions Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package io.infinicast;

import java.util.concurrent.ConcurrentHashMap;

public class ConcurrentHashmapExtensions {
    public static  V getOrAdd(ConcurrentHashMap map,K key, V value) {
        V result = map.putIfAbsent(key, value);
        return null == result ? value : result;
    }
}






© 2015 - 2024 Weber Informatics LLC | Privacy Policy