code: public Object put(Object key, Object value)
      {
          if (key == null) throw new NullPointerException("null keys not allowed");
          if (value == null) throw new NullPointerException("null values not allowed");
  
          purge();
          if (size + 1 > threshold) resize();
  
          int hash = hashCode(key);
          int index = indexFor(hash);
          Entry entry = table[index];
          while (entry != null)
          {
              if ((hash == entry.hash) && equals(key, entry.getKey()))
              {
                  Object result = entry.getValue();
                  entry.setValue(value);
                  return result;
              }
              entry = entry.next;
          }
          this.size++;
          modCount++;
          key = toReference(keyType, key, hash);
          value = toReference(valueType, value, hash);
          table[index] = new Entry(key, hash, value, table[index]);
          return null;
      }
docs: Associates the given key with the given value.<P>
  Neither the key nor the value may be null.
  
  @param key  the key of the mapping
  @param value  the value of the mapping
  @return  the last value associated with that key, or
  null if no value was associated with the key
  @throws java.lang.NullPointerException if either the key or value
  is null