public T put(int key, T value) {
        // Makes sure the key is not already in the hashtable.
        Entry<T>[] tab = table;
        int hash = key;
        int index = (hash & 0x7FFFFFFF) % tab.length;
        for (Entry<T> e = tab[index]; e != null; e = e.next) {
            if (e.hash == hash) {
                T old = e.value;
                e.value = value;
                return old;
            }
        }

        if (count >= threshold) {
            // Rehash the table if the threshold is exceeded
            rehash();

            tab = table;
            index = (hash & 0x7FFFFFFF) % tab.length;
        }

        // Creates the new entry.
        Entry<T> e = new Entry<T>(hash, key, value, tab[index]);
        tab[index] = e;
        count++;
        return null;
    }
<p>Maps the specified <code>key</code> to the specified
<code>value</code> in this hashtable. The key cannot be
<code>null</code>. </p>

<p>The value can be retrieved by calling the <code>get</code> method
with a key that is equal to the original key.</p>

@param key     the hashtable key.
@param value   the value.
@return the previous value of the specified key in this hashtable,
        or <code>null</code> if it did not have one.
@throws  NullPointerException  if the key is <code>null</code>.
@see     #get(int)
commons/src/main/java/com/navercorp/pinpoint/common/util/apache/IntHashMap.java