(int index)
| 620 | |
| 621 | |
| 622 | public float removeIndex(int index) { |
| 623 | if (index < 0 || index >= count) { |
| 624 | throw new ArrayIndexOutOfBoundsException(index); |
| 625 | } |
| 626 | float value = values[index]; |
| 627 | indices.remove(keys[index]); |
| 628 | for (int i = index; i < count-1; i++) { |
| 629 | keys[i] = keys[i+1]; |
| 630 | values[i] = values[i+1]; |
| 631 | indices.put(keys[i], i); |
| 632 | } |
| 633 | count--; |
| 634 | keys[count] = null; |
| 635 | values[count] = 0; |
| 636 | return value; |
| 637 | } |
| 638 | |
| 639 | |
| 640 | public void swap(int a, int b) { |