MCPcopy Create free account
hub / github.com/antlr/codebuff / containsEntryImpl

Method containsEntryImpl

output/java_guava/1.4.17/Maps.java:3601–3606  ·  view source on GitHub ↗

Implements Collection.contains safely for forwarding collections of map entries. If o is an instance of Map.Entry, it is wrapped using #unmodifiableEntry to protect against a possible nefarious equals method. Note that c is the backing (delegate) collectio

(Collection<Entry<K, V>> c, Object o)

Source from the content-addressed store, hash-verified

3599
3600
3601 static <K, V> boolean containsEntryImpl(Collection<Entry<K, V>> c, Object o) {
3602 if (!(o instanceof Entry)) {
3603 return false;
3604 }
3605 return c.contains(unmodifiableEntry((Entry<?, ?>) o));
3606 }
3607
3608 /**
3609 * Implements {@code Collection.remove} safely for forwarding collections of

Callers 5

containsMethod · 0.95
containsMethod · 0.95
containsMethod · 0.95
containsMethod · 0.95
containsMethod · 0.95

Calls 2

unmodifiableEntryMethod · 0.95
containsMethod · 0.65

Tested by

no test coverage detected