MCPcopy Create free account
hub / github.com/benfry/processing4 / removeIndex

Method removeIndex

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

Source from the content-addressed store, hash-verified

607
608
609 public long removeIndex(int index) {
610 if (index < 0 || index >= count) {
611 throw new ArrayIndexOutOfBoundsException(index);
612 }
613 long value = values[index];
614 indices.remove(keys[index]);
615 for (int i = index; i < count-1; i++) {
616 keys[i] = keys[i+1];
617 values[i] = values[i+1];
618 indices.put(keys[i], i);
619 }
620 count--;
621 keys[count] = null;
622 values[count] = 0;
623 return value;
624 }
625
626
627 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