MCPcopy Create free account
hub / github.com/ReadyTalk/avian / ensureCapacity

Method ensureCapacity

classpath/java/util/ArrayDeque.java:49–58  ·  view source on GitHub ↗
(int newSize)

Source from the content-addressed store, hash-verified

47 }
48
49 private void ensureCapacity(int newSize) {
50 if (dataArray.length < newSize) {
51 Object[] newArray = new Object[dataArray.length * 2];
52 copyInto(newArray);
53
54 dataArray = newArray;
55 startIndex = 0;
56 endIndex = size - 1;
57 }
58 }
59
60 @Override
61 public boolean offerFirst(T e) {

Callers 3

offerFirstMethod · 0.95
offerLastMethod · 0.95
addAllMethod · 0.95

Calls 1

copyIntoMethod · 0.95

Tested by

no test coverage detected