MCPcopy Index your code
hub / github.com/apache/groovy / add

Method add

src/main/java/org/codehaus/groovy/util/FastArray.java:95–102  ·  view source on GitHub ↗

Appends an element to the end of this array, growing the backing storage when needed. @param o the element to append

(Object o)

Source from the content-addressed store, hash-verified

93 * @param o the element to append
94 */
95 public void add(Object o) {
96 if (size == data.length) {
97 Object [] newData = new Object[size == 0 ? 8 : size*2];
98 System.arraycopy(data, 0, newData, 0, size);
99 data = newData;
100 }
101 data [size++] = o;
102 }
103
104 /**
105 * Replaces the element stored at the specified index.

Callers 2

getMethodsMethod · 0.95

Calls 1

arraycopyMethod · 0.80

Tested by

no test coverage detected