()
| 554 | // returns the index of the minimum value. |
| 555 | // if there are ties, it returns the first one found. |
| 556 | public int minIndex() { |
| 557 | checkMinMax("minIndex"); |
| 558 | int value = data[0]; |
| 559 | int index = 0; |
| 560 | for (int i = 1; i < count; i++) { |
| 561 | if (data[i] < value) { |
| 562 | value = data[i]; |
| 563 | index = i; |
| 564 | } |
| 565 | } |
| 566 | return index; |
| 567 | } |
| 568 | |
| 569 | |
| 570 | /** |
nothing calls this directly
no test coverage detected