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

Method grow

classpath/java/util/ArrayList.java:36–41  ·  view source on GitHub ↗
(int newSize)

Source from the content-addressed store, hash-verified

34 }
35
36 private void grow(int newSize) {
37 if (array == null || newSize > array.length) {
38 resize(Math.max(newSize, array == null
39 ? MinimumCapacity : array.length * 2));
40 }
41 }
42
43 private void shrink(int newSize) {
44 if (array.length / 2 >= MinimumCapacity && newSize <= array.length / 3) {

Callers 3

ensureCapacityMethod · 0.95
addMethod · 0.95
readObjectMethod · 0.95

Calls 2

resizeMethod · 0.95
maxMethod · 0.95

Tested by

no test coverage detected