public Object remove(Object key){
synchronized (map) {
    if (removeElement(key)) {
      return map.remove(key);
    }
  }
  return null;
}

public Object remove ( Object key ) { synchronized ( map ) { if ( removeElement ( key ) ) { return map . remove ( key ) ; } } return null ; }
removes the element associated with the key .
