()
| 546 | // returns the index of the maximum value. |
| 547 | // if there are ties, it returns the first one found. |
| 548 | public int maxIndex() { |
| 549 | checkMinMax("maxIndex"); |
| 550 | int value = data[0]; |
| 551 | int index = 0; |
| 552 | for (int i = 1; i < count; i++) { |
| 553 | if (data[i] > value) { |
| 554 | value = data[i]; |
| 555 | index = i; |
| 556 | } |
| 557 | } |
| 558 | return index; |
| 559 | } |
| 560 | |
| 561 | |
| 562 | public int sum() { |
nothing calls this directly
no test coverage detected