public V put()

in core/src/main/java/gnu/trove/TIntObjectHashMap.java [202:222]


  public V put(int key, V value) {
    boolean wasFree = false;
    V previous = null;
    int index = insertionIndex(key);
    boolean isNewMapping = true;
    if (index < 0) {
      index = -index - 1;
      previous = unwrapNull(_values[index]);
      isNewMapping = false;
    }
    else {
      wasFree = isFree(_values, index);
    }
    _set[index] = key;
    _values[index] = wrapNull(value);
    if (isNewMapping) {
      postInsertHook(wasFree);
    }

    return previous;
  }