void (int newN) { int[] key = this.key; int[] value = this.value; int mask = newN - 1; // Note that this is used by the hashing macro int[] newKey = new int[newN + 1]; int[] newValue = new int[newN + 1]; int i = n, pos; for (int j = realSize(); j-- != 0; ) { while (key[--i] == 0) ; if (!(newKey[pos = Hash.mix(key[i]) & mask] == 0)) { while (!(newKey[pos = pos + 1 & mask] == 0)) ; } newKey[pos] = key[i]; newValue[pos] = value[i]; } n = newN; this.mask = mask; maxFill = Hash.maxFill(n, f); this.key = newKey; this.value = newValue; for (i = 0; i < key.length; i++) { int k = key[i]; int v = value[i]; assert k==0 || get(k,-1)==v; } }