MCPcopy Create free account
hub / github.com/questdb/questdb / checkCapacity

Method checkCapacity

core/src/main/java/io/questdb/std/ObjList.java:93–102  ·  view source on GitHub ↗
(int capacity)

Source from the content-addressed store, hash-verified

91 }
92
93 @SuppressWarnings("unchecked")
94 public void checkCapacity(int capacity) {
95 int l = buffer.length;
96 if (capacity > l) {
97 int newCap = Math.max(l << 1, capacity);
98 T[] buf = (T[]) new Object[newCap];
99 System.arraycopy(buffer, 0, buf, 0, l);
100 this.buffer = buf;
101 }
102 }
103
104 @Override
105 public void clear() {

Callers 8

addMethod · 0.95
addAllMethod · 0.95
addReverseAllMethod · 0.95
extendAndSetMethod · 0.95
extendPosMethod · 0.95
insertMethod · 0.95
setAllMethod · 0.95
setPosMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected