MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / clear

Method clear

Ports/CLDC11/src/java/util/ArrayList.java:263–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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 ///

Callers 1

deleteContactMethod · 0.95

Calls 1

fillMethod · 0.95

Tested by

no test coverage detected