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

Method removeIndex

core/src/processing/data/IntDict.java:634–649  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

632
633
634 public int removeIndex(int index) {
635 if (index < 0 || index >= count) {
636 throw new ArrayIndexOutOfBoundsException(index);
637 }
638 int value = values[index];
639 indices.remove(keys[index]);
640 for (int i = index; i < count-1; i++) {
641 keys[i] = keys[i+1];
642 values[i] = values[i+1];
643 indices.put(keys[i], i);
644 }
645 count--;
646 keys[count] = null;
647 values[count] = 0;
648 return value;
649 }
650
651
652 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