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

Method removeEntryImpl

guava/src/com/google/common/collect/Maps.java:3838–3844  ·  view source on GitHub ↗

Implements {@code Collection.remove} safely for forwarding collections of map entries. If {@code o} is an instance of {@code Entry}, it is wrapped using {@link #unmodifiableEntry} to protect against a possible nefarious equals method. <p>Note that {@code c} is backing (delegate) collection, rather

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

Source from the content-addressed store, hash-verified

3836 * @return {@code true} if {@code c} was changed
3837 */
3838 static <K extends @Nullable Object, V extends @Nullable Object> boolean removeEntryImpl(
3839 Collection<Entry<K, V>> c, @Nullable Object o) {
3840 if (!(o instanceof Entry)) {
3841 return false;
3842 }
3843 return c.remove(unmodifiableEntry((Entry<?, ?>) o));
3844 }
3845
3846 /** An implementation of {@link Map#equals}. */
3847 static boolean equalsImpl(Map<?, ?> map, @Nullable Object object) {

Callers 1

removeMethod · 0.95

Calls 2

unmodifiableEntryMethod · 0.95
removeMethod · 0.65

Tested by

no test coverage detected