code: private V putImpl(K key, V value)
    {
      V item = null;
  
      int hash = key.hashCode() & _mask;
      int count = _values.length;
  
      for (; count > 0; count--) {
        item = _values[hash];
  
        // No matching item, so create one
        if (item == null) {
          _keys[hash] = key;
          _values[hash] = value;
          _size++;
  
          return null;
        }
  
        // matching item gets replaced
        if (_keys[hash].equals(key)) {
          _values[hash] = value;
  
          return item;
        }
  
        hash = (hash + 1) & _mask;
      }
  
      throw new IllegalStateException();
    }
docs: Implementation of the put.