protected void rehash()

in core/src/main/java/gnu/trove/TLongIntHashMap.java [164:183]


  protected void rehash(int newCapacity) {
    int oldCapacity = capacity();
    long[] oldKeys = _set;
    int[] oldVals = _values;
    byte[] oldStates = _states;

    _set = new long[newCapacity];
    _values = new int[newCapacity];
    _states = new byte[newCapacity];

    for (int i = oldCapacity; i-- > 0; ) {
      if (oldStates[i] == FULL) {
        long o = oldKeys[i];
        int index = insertionIndex(o);
        _set[index] = o;
        _values[index] = oldVals[i];
        _states[index] = FULL;
      }
    }
  }