Code example for ConcurrentHashMap

Methods: containsKey, get

0
			} 
 
			return; 
		} 
 
		if (mTasks.containsKey(key)) {
			mTasks.get(key).addListener(listener);
		} 
	} 
 
	public static void removeListener(String key, TaskListener<?> listener) {
		if (mTasks.containsKey(key)) {
			ManagedTask task = mTasks.get(key);
			task.removeListener(listener);
		} 
	} 
 
	public static void clearListener(String key) {
		if (mTasks.containsKey(key)) {
			ManagedTask task = mTasks.get(key);
			task.clearListeners();