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

Method containsEntryImpl

output/java_guava/1.4.19/Maps.java:3605–3610  ·  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

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

Callers 4

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