MCPcopy Index your code
hub / github.com/questdb/questdb / rehash

Method rehash

core/src/main/java/io/questdb/std/ObjHashSet.java:190–204  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

188 }
189
190 @SuppressWarnings({"unchecked"})
191 private void rehash() {
192 free = capacity = this.capacity * 2;
193 T[] oldKeys = keys;
194 this.keys = (T[]) new Object[Numbers.ceilPow2((int) (this.capacity / loadFactor))];
195 Arrays.fill(keys, noEntryKey);
196 mask = keys.length - 1;
197
198 for (int i = oldKeys.length; i-- > 0; ) {
199 T key = oldKeys[i];
200 if (key != noEntryKey) {
201 addAt0(keyIndex(key), key);
202 }
203 }
204 }
205
206 private void removeAt(int index) {
207 if (index < 0) {

Callers 1

addAt0Method · 0.95

Calls 4

ceilPow2Method · 0.95
addAt0Method · 0.95
keyIndexMethod · 0.95
fillMethod · 0.45

Tested by

no test coverage detected