public int put(Object key, int value) {
    if (key == null) {
      return putForNullKey(value);
    }
    int hash = hash(hashingStrategy.hashCode(key));
    int i = indexFor(hash, table.length);
    for (Entry e = table[i]; e != null; e = e.next) {
      Object k;
      if (e.hash == hash && ((k = e.key) == key || hashingStrategy.equals(k, key))) {
        int oldValue = e.value;
        e.value = value;
        e.recordAccess(this);
        return oldValue;
      }
    }

    modCount++;
    addEntry(hash, key, value, i);
    return 0;
  }
Associates the specified value with the specified key in this map. If the map previously
contained a mapping for the key, the old value is replaced.

@param key key with which the specified value is to be associated
@param value value to be associated with the specified key
@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