Interfaces are consistent with how they work, although I cannot explain the root causes.
Interface Map<K,V> boolean containsKey(Object key) V put(K key, V value) Interface List<E> boolean contains(Object o) boolean add(E e)
In both cases, contains methods accept objects, and insert operations accept general types.
Thomas
source share