code: public boolean remove(Object key, Object value) {
          final Object curValue = get(key);
  
          if (!Objects.equals(curValue, value) || (curValue == null && !containsKey(key))) {
              return false;
          }
  
          remove(key);
  
          return true;
      }
docs: Removes the entry for the specified key only if it is currently
  mapped to the specified value.