@SuppressWarnings("DuplicatedCode")
  private void rehash(final int newN) {
    final long[] keys = this.keys;
    final V[] values = this.values;
    final int mask = newN - 1; // Note that this is used by the hashing macro
    final long[] newKey = new long[newN + 1];
    final V[] newValue = valueArrayFactory.apply(newN + 1);
    int i = tableSize;
    int pos;
    for (int j = realSize(); j-- != 0; ) {
      //noinspection StatementWithEmptyBody
      while (keys[--i] == 0) ;
      if (!(newKey[pos = (int)keys[i] & mask] == 0)) {
        //noinspection StatementWithEmptyBody
        while (!(newKey[pos = pos + 1 & mask] == 0)) ;
      }
      newKey[pos] = keys[i];
      newValue[pos] = values[i];
    }
    newValue[newN] = values[tableSize];
    tableSize = newN;
    this.mask = mask;
    maxFill = Hash.maxFill(tableSize, Hash.FAST_LOAD_FACTOR);
    this.keys = newKey;
    this.values = newValue;
  }
@SuppressWarnings("DuplicatedCode")
  private void rehash(final int newN)