Implements {@code Collection.contains} 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 the backing (delegate) collection, r
(
Collection<Entry<K, V>> c, @Nullable Object o)
| 3817 | * @return {@code true} if {@code c} contains {@code o} |
| 3818 | */ |
| 3819 | static <K extends @Nullable Object, V extends @Nullable Object> boolean containsEntryImpl( |
| 3820 | Collection<Entry<K, V>> c, @Nullable Object o) { |
| 3821 | if (!(o instanceof Entry)) { |
| 3822 | return false; |
| 3823 | } |
| 3824 | return c.contains(unmodifiableEntry((Entry<?, ?>) o)); |
| 3825 | } |
| 3826 | |
| 3827 | /** |
| 3828 | * Implements {@code Collection.remove} safely for forwarding collections of map entries. If |
no test coverage detected