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

Method removeIndex

core/src/processing/data/LongDict.java:595–610  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

593
594
595 public long removeIndex(int index) {
596 if (index < 0 || index >= count) {
597 throw new ArrayIndexOutOfBoundsException(index);
598 }
599 long value = values[index];
600 indices.remove(keys[index]);
601 for (int i = index; i < count-1; i++) {
602 keys[i] = keys[i+1];
603 values[i] = values[i+1];
604 indices.put(keys[i], i);
605 }
606 count--;
607 keys[count] = null;
608 values[count] = 0;
609 return value;
610 }
611
612
613 public void swap(int a, int b) {

Callers 1

removeMethod · 0.95

Calls 2

removeMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected