MCPcopy Index your code
hub / github.com/processing/processing / remove

Method remove

core/src/processing/data/IntList.java:221–238  ·  view source on GitHub ↗

Remove an element from the specified index @webref intlist:method @brief Remove an element from the specified index

(int index)

Source from the content-addressed store, hash-verified

219 * @brief Remove an element from the specified index
220 */
221 public int remove(int index) {
222 if (index < 0 || index >= count) {
223 throw new ArrayIndexOutOfBoundsException(index);
224 }
225 int entry = data[index];
226// int[] outgoing = new int[count - 1];
227// System.arraycopy(data, 0, outgoing, 0, index);
228// count--;
229// System.arraycopy(data, index + 1, outgoing, 0, count - index);
230// data = outgoing;
231 // For most cases, this actually appears to be faster
232 // than arraycopy() on an array copying into itself.
233 for (int i = index; i < count-1; i++) {
234 data[i] = data[i+1];
235 }
236 count--;
237 return entry;
238 }
239
240
241 // Remove the first instance of a particular value,

Callers 11

removeValueMethod · 0.95
disposeMethod · 0.45
removeCacheMethod · 0.45
removeFontTextureMethod · 0.45
disposeMethod · 0.45
completeTransfersMethod · 0.45
disposeSourceBufferMethod · 0.45
getBufferPixelsMethod · 0.45
bufferUpdateMethod · 0.45
removeTextureMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected