What are the reasons why Map.get(Object key) is not (fully) generic
Java Generics: Why Does Map.get() Ignore Type?
boolean containsKey(Object key)
boolean containsKey(K key)
boolean add(E e).
It's the same reason why you can't add anything to a
List<? extends E> because the compiler can't guarantee the type safety (and type erasure makes a runtime check impossible).
This means that when you get a
Map<? extends K,V> you wouldn't be able to call
contains(K) on it. however
contains is general enough that passing random
Objects to it won't damage the interface (but makes some errors harder to pick up).