code: public V put (int key, V value)
      {
          // check to see if we've passed our load factor, if so: resize
          ensureCapacity(_size + 1);
  
          int index = keyToIndex(key);
          Record<V> rec = _buckets[index];
  
          // either we start a new chain
          if (rec == null) {
              _buckets[index] = new Record<V>(key, value);
              _size++; // we're bigger
              return null;
          }
  
          // or we replace an element in an existing chain
          Record<V> prev = rec;
          for (; rec != null; rec = rec.next) {
              if (rec.key == key) {
                  V ovalue = rec.value;
                  rec.value = value; // we're not bigger
                  return ovalue;
              }
              prev = rec;
          }
  
          // or we append it to this chain
          prev.next = new Record<V>(key, value);
          _size++; // we're bigger
          return null;
      }
docs: documentation inherited