()
| 584 | // returns the index of the maximum value. |
| 585 | // if there are ties, it returns the first one found. |
| 586 | public int maxIndex() { |
| 587 | checkMinMax("maxIndex"); |
| 588 | long value = data[0]; |
| 589 | int index = 0; |
| 590 | for (int i = 1; i < count; i++) { |
| 591 | if (data[i] > value) { |
| 592 | value = data[i]; |
| 593 | index = i; |
| 594 | } |
| 595 | } |
| 596 | return index; |
| 597 | } |
| 598 | |
| 599 | |
| 600 | public int sum() { |
nothing calls this directly
no test coverage detected