(int minimumCapacity)
| 310 | /// |
| 311 | /// - `minimumCapacity`: the minimum capacity asked for. |
| 312 | public void ensureCapacity(int minimumCapacity) { |
| 313 | int required = minimumCapacity - array.length; |
| 314 | if (required > 0) { |
| 315 | // REVIEW: Why do we check the firstIndex first? Growing |
| 316 | // the end makes more sense |
| 317 | if (firstIndex > 0) { |
| 318 | growAtFront(required); |
| 319 | } else { |
| 320 | growAtEnd(required); |
| 321 | } |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | @Override |
| 326 | public E get(int location) { |
nothing calls this directly
no test coverage detected