(int capacity)
| 91 | } |
| 92 | |
| 93 | @SuppressWarnings("unchecked") |
| 94 | public void checkCapacity(int capacity) { |
| 95 | int l = buffer.length; |
| 96 | if (capacity > l) { |
| 97 | int newCap = Math.max(l << 1, capacity); |
| 98 | T[] buf = (T[]) new Object[newCap]; |
| 99 | System.arraycopy(buffer, 0, buf, 0, l); |
| 100 | this.buffer = buf; |
| 101 | } |
| 102 | } |
| 103 | |
| 104 | @Override |
| 105 | public void clear() { |
no outgoing calls
no test coverage detected