Code example for ConcurrentHashMap

Methods: clear

0
    public T remove(String key) {
        return map.remove(key);
    } 
 
    public void clear() { 
        map.clear();
    } 
 
    public Iterator<T> iterator() {
        return map.values().iterator();
    } 
 
    public Object[] currentState() {
        return new Object[]{map};
    } 
 
    public void restoreState(Object[] objects) {
        map = (ConcurrentHashMap<String, T>) objects[0];
    } 
 
    public int size() {