Code example for ConcurrentMap

Methods: containsKey, get

0
 
	@Override 
	public Object get(String key) {
		// TODO Auto-generated method stub 
		if(hasKey(key))
			return cache.get(key);
		 
		return null; 
	} 
 
	@Override 
	public void remove(String key) {
		// TODO Auto-generated method stub 
		cache.remove(key);
	} 
 
	@Override 
	public boolean hasKey(String key) {
		// TODO Auto-generated method stub 
		return cache.containsKey(key);
	} 
 
	@Override 
	public void clear() { 
		// TODO Auto-generated method stub