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)
| 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) { |
no test coverage detected