()
| 51 | } |
| 52 | |
| 53 | public double max() { |
| 54 | if (size() == 0) { |
| 55 | throw new NoSuchElementException(); |
| 56 | } |
| 57 | |
| 58 | double out = get(0); |
| 59 | for (int i = 1; i < size(); ++i) { |
| 60 | out = Math.max(out, get(i)); |
| 61 | } |
| 62 | |
| 63 | return out; |
| 64 | } |
| 65 | |
| 66 | public int size() { |
| 67 | if (end == -1) { |
no test coverage detected