MCPcopy
hub / github.com/libgdx/libgdx / insert

Method insert

gdx/src/com/badlogic/gdx/utils/Array.java:182–192  ·  view source on GitHub ↗
(int index, T value)

Source from the content-addressed store, hash-verified

180 }
181
182 public void insert (int index, T value) {
183 if (index > size) throw new IndexOutOfBoundsException("index can't be > size: " + index + " > " + size);
184 T[] items = this.items;
185 if (size == items.length) items = resize(Math.max(8, (int)(size * 1.75f)));
186 if (ordered)
187 System.arraycopy(items, index, items, index + 1, size - index);
188 else
189 items[size] = items[index];
190 size++;
191 items[index] = value;
192 }
193
194 /** Inserts the specified number of items at the specified index. The new items will have values equal to the values at those
195 * indices before the insertion. */

Callers 10

playMethod · 0.45
playMethod · 0.45
loopMethod · 0.45
fillMethod · 0.45
fillMethod · 0.45
playMethod · 0.45
clickedMethod · 0.45
addMethod · 0.45
addProcessorMethod · 0.45
addMethod · 0.45

Calls 2

resizeMethod · 0.95
maxMethod · 0.45

Tested by 2

clickedMethod · 0.36
addMethod · 0.36