Code example for ConcurrentMap

Methods: putIfAbsent

0
public class ConcurrentWeakHashMap extends WeakHashMap {
	private static final MapMaker mapMaker = new MapMaker().weakKeys();
	private final ConcurrentMap map = mapMaker.makeMap();
 
	public Object putIfAbsent(final Object key, final Object value) {
		return map.putIfAbsent(key, value);
	} 
 
	public Object replace(final Object key, final Object value) {
		return map.replace(key, value);
	} 
 
	public boolean remove(final Object key, final Object value) {
		return map.remove(key, value);
	} 
 
	public boolean replace(final Object key, final Object oldValue, final Object newValue) {
		return map.replace(key, oldValue, newValue);
	} 
 
	@Override