Implements Collection.remove 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 backing (delegate) collection, rat
(Collection<Entry<K, V>> c, Object o)
| 3625 | |
| 3626 | |
| 3627 | static <K, V> boolean removeEntryImpl(Collection<Entry<K, V>> c, Object o) { |
| 3628 | if (!(o instanceof Entry)) { |
| 3629 | return false; |
| 3630 | } |
| 3631 | return c.remove(unmodifiableEntry((Entry<?, ?>) o)); |
| 3632 | } |
| 3633 | |
| 3634 | /** |
| 3635 | * An implementation of {@link Map#equals}. |
no test coverage detected