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

Method copyInto

classpath/java/util/ArrayDeque.java:38–47  ·  view source on GitHub ↗
(Object[] array)

Source from the content-addressed store, hash-verified

36 }
37
38 private void copyInto(Object[] array) {
39 if (startIndex <= endIndex) {
40 // only one copy needed
41 System.arraycopy(dataArray, startIndex, array, 0, size);
42 } else {
43 int firstCopyCount = dataArray.length - startIndex;
44 System.arraycopy(dataArray, startIndex, array, 0, firstCopyCount);
45 System.arraycopy(dataArray, 0, array, firstCopyCount, endIndex + 1);
46 }
47 }
48
49 private void ensureCapacity(int newSize) {
50 if (dataArray.length < newSize) {

Callers 2

ensureCapacityMethod · 0.95
toArrayMethod · 0.95

Calls 1

arraycopyMethod · 0.95

Tested by

no test coverage detected