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

Method clear

vm/JavaAPI/src/java/util/HashMap.java:340–347  ·  view source on GitHub ↗

Removes all mappings from this hash map, leaving it empty. @see #isEmpty @see #size

()

Source from the content-addressed store, hash-verified

338 * @see #size
339 */
340 @Override
341 public void clear() {
342 if (elementCount > 0) {
343 elementCount = 0;
344 Arrays.fill(elementData, null);
345 modCount++;
346 }
347 }
348
349 /**
350 * Computes the threshold for rehashing

Callers

nothing calls this directly

Calls 2

fillMethod · 0.95
clearMethod · 0.65

Tested by

no test coverage detected