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

Method removeIndex

core/src/processing/data/FloatDict.java:658–673  ·  view source on GitHub ↗
(int index)

Source from the content-addressed store, hash-verified

656
657
658 public float removeIndex(int index) {
659 if (index < 0 || index >= count) {
660 throw new ArrayIndexOutOfBoundsException(index);
661 }
662 float value = values[index];
663 indices.remove(keys[index]);
664 for (int i = index; i < count-1; i++) {
665 keys[i] = keys[i+1];
666 values[i] = values[i+1];
667 indices.put(keys[i], i);
668 }
669 count--;
670 keys[count] = null;
671 values[count] = 0;
672 return value;
673 }
674
675
676 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