Code example for ConcurrentHashMap

Methods: containsKey, get, remove

0
 
		} 
	} 
 
	public void removeAllListenerForActionCommand(String actionCommand) { 
		if (listenerMap.containsKey(actionCommand)) { 
			Vector<EventBusListener> listeners = listenerMap.get(actionCommand); 
			listeners.clear(); 
			listenerMap.remove(actionCommand); 
		} 
	} 
 
	public synchronized int getEventId() { 
		return eventIdIndex++; 
	} 
}