()
| 261 | /// |
| 262 | /// - #size |
| 263 | @Override |
| 264 | public void clear() { |
| 265 | if (size != 0) { |
| 266 | // REVIEW: Should we use Arrays.fill() instead of just |
| 267 | // allocating a new array? Should we use the same |
| 268 | // sized array? |
| 269 | Arrays.fill(array, firstIndex, firstIndex + size, null); |
| 270 | // REVIEW: Should the indexes point into the middle of the |
| 271 | // array rather than 0? |
| 272 | firstIndex = size = 0; |
| 273 | modCount++; |
| 274 | } |
| 275 | } |
| 276 | |
| 277 | /// Searches this `ArrayList` for the specified object. |
| 278 | /// |