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)
| 3599 | |
| 3600 | |
| 3601 | static <K, V> boolean containsEntryImpl(Collection<Entry<K, V>> c, Object o) { |
| 3602 | if (!(o instanceof Entry)) { |
| 3603 | return false; |
| 3604 | } |
| 3605 | return c.contains(unmodifiableEntry((Entry<?, ?>) o)); |
| 3606 | } |
| 3607 | |
| 3608 | /** |
| 3609 | * Implements {@code Collection.remove} safely for forwarding collections of |