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