(int index)
| 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) { |