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)
| 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 |