MCPcopy Index your code
hub / github.com/antlr/codebuff / removeAllZeros

Method removeAllZeros

output/java_guava/1.4.17/AtomicLongMap.java:282–291  ·  view source on GitHub ↗

Removes all mappings from this map whose values are zero. This method is not atomic: the map may be visible in intermediate states, where some of the zero values have been removed and others have not.

()

Source from the content-addressed store, hash-verified

280
281
282 public void removeAllZeros() {
283 Iterator<Map.Entry<K, AtomicLong>> entryIterator = map.entrySet().iterator();
284 while (entryIterator.hasNext()) {
285 Map.Entry<K, AtomicLong> entry = entryIterator.next();
286 AtomicLong atomic = entry.getValue();
287 if (atomic != null && atomic.get() == 0L) {
288 entryIterator.remove();
289 }
290 }
291 }
292
293 /**
294 * Returns the sum of all values in this map.

Callers

nothing calls this directly

Calls 7

iteratorMethod · 0.65
entrySetMethod · 0.65
nextMethod · 0.65
getValueMethod · 0.65
getMethod · 0.65
removeMethod · 0.65
hasNextMethod · 0.45

Tested by

no test coverage detected