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

Method retainAll

output/java_guava/1.4.17/Maps.java:3986–4001  ·  view source on GitHub ↗
(Collection<?> c)

Source from the content-addressed store, hash-verified

3984 }
3985
3986 @Override
3987 public boolean retainAll(Collection<?> c) {
3988 try {
3989 return super.retainAll(checkNotNull(c));
3990 } catch (UnsupportedOperationException e) {
3991 // if the iterators don't support remove
3992 Set<Object> keys = Sets.newHashSetWithExpectedSize(c.size());
3993 for (Object o : c) {
3994 if (contains(o)) {
3995 Entry<?, ?> entry = (Entry<?, ?>) o;
3996 keys.add(entry.getKey());
3997 }
3998 }
3999 return map().keySet().retainAll(keys);
4000 }
4001 }
4002 }
4003
4004 @GwtIncompatible // NavigableMap

Callers

nothing calls this directly

Calls 9

containsMethod · 0.95
mapMethod · 0.95
retainAllMethod · 0.65
sizeMethod · 0.65
addMethod · 0.65
getKeyMethod · 0.65
keySetMethod · 0.65
checkNotNullMethod · 0.45

Tested by

no test coverage detected