code: @Override
      @LogarithmicTime
      public void insert(Integer key, V value) {
          if (Constants.NOT_BENCHMARK) {
              if (key == null) {
                  throw new NullPointerException("Null keys not permitted");
              }
              // make space if needed
              if (size == array.length - 2) {
                  if (array.length == 2) {
                      ensureCapacity(1);
                  } else {
                      ensureCapacity(2 * (array.length - 2));
                  }
              }
          }
  
          ++size;
          int hole = size;
          int pred = hole >> 1;
          Elem<V> predElem = array[pred];
  
          while (predElem.key > key) {
              array[hole].key = predElem.key;
              array[hole].value = predElem.value;
  
              hole = pred;
              pred >>= 1;
              predElem = array[pred];
          }
  
          array[hole].key = key;
          array[hole].value = value;
      }
docs: {@inheritDoc}