public int remove(Object key) {
    Entry e = removeEntryForKey(key);
    return (e == null ? 0 : e.value);
  }
Removes the mapping for the specified key from this map if present.

@param key key whose mapping is to be removed from the map
@return the previous value associated with <tt>key</tt>, or <tt>null</tt> if there was no
        mapping for <tt>key</tt>. (A <tt>null</tt> return can also indicate that the map
        previously associated <tt>null</tt> with <tt>key</tt>.)
geode-core/src/main/java/org/apache/geode/cache/query/internal/ObjectIntHashMap.java