You are right: dropping Map<K,V>
from linked hash map's declaration would not change anything. Although LinkedHashMap<K,V>
would implement Map<K,V>
simply because it extends HashMap<K,V>
, the fact that linked hash map derives from a regular hash map is an implementation detail, not a hard requirement.
Implementing the Map<K,V>
interface, on the other hand, is a fundamental requirement. This requirement would not disappear if the designers decided to implement LinkedHashMap<K,V>
from scratch, or to rely on some other base class, e.g. a linked list.
That is why the designers of LinkedHashMap<K,V>
mentioned Map<K,V>
explicitly: if at some later day a base class would change due to redesign, the interface would stay in place.