MCPcopy
hub / github.com/google/guava / removeIf

Method removeIf

guava/src/com/google/common/cache/LocalCache.java:4552–4567  ·  guava/src/com/google/common/cache/LocalCache.java::LocalCache.removeIf
(BiPredicate<? super K, ? super V> filter)

Source from the content-addressed store, hash-verified

4550 }
4551
4552 boolean removeIf(BiPredicate<? super K, ? super V> filter) {
4553 checkNotNull(filter);
4554 boolean changed = false;
4555 for (K key : keySet()) {
4556 while (true) {
4557 V value = get(key);
4558 if (value == null || !filter.test(key, value)) {
4559 break;
4560 } else if (LocalCache.this.remove(key, value)) {
4561 changed = true;
4562 break;
4563 }
4564 }
4565 }
4566 return changed;
4567 }
4568
4569 final class KeySet extends AbstractCacheSet<K> {
4570

Callers

nothing calls this directly

Calls 5

keySetMethod · 0.95
getMethod · 0.95
testMethod · 0.65
removeMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected