(int count)
| 143 | } |
| 144 | |
| 145 | public void shrink(int count) { |
| 146 | Object[] buffer; |
| 147 | int n = this.count; |
| 148 | if (n <= 0) { |
| 149 | reset(); |
| 150 | return; |
| 151 | } |
| 152 | if (count < n) |
| 153 | count = n; |
| 154 | if (count < (buffer = keys).length) { |
| 155 | Object[] buf = new Object[count]; |
| 156 | System.arraycopy(buffer, 0, buf, 0, n); |
| 157 | keys = buf; |
| 158 | } |
| 159 | if (count < (buffer = values).length) { |
| 160 | Object[] buf = new Object[count]; |
| 161 | System.arraycopy(buffer, 0, buf, 0, n); |
| 162 | values = buf; |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | public void shrink() { |
| 167 | shrink(0); |
no test coverage detected