public Object remove(int key) {
    Entry[] table = this.table;
    int bucket = Math.abs(key) % table.length;

    for (Entry e = table[bucket], prev = null; e != null; prev = e, e = e.next) {
      if (key == e.key) {
        if (prev != null) {
          prev.next = e.next;
        } else {
          table[bucket] = e.next;
        }

        count--;
        Object oldValue = e.value;
        e.value = null;
        return oldValue;
      }
    }

    return null;
  }
Removes the mapping for the given key. Returns the object to which the key was mapped, or
<code>null</code> otherwise.
geode-core/src/main/java/org/apache/geode/internal/admin/ListenerIdMap.java