Showing posts with label Collections. Show all posts
Showing posts with label Collections. Show all posts

Comparison of Maps in Java Collections Framework

March 26, 2015

Maps, Hash tables(in general sense), Dictionaries whatever you call them, in every well known programming language there are similar data structures. In java we have Maps as a part of the collections framework.
Although Maps do not implement Collection interface they are still one of the most important part of the framework. Java SE library provides several implementations of Map data structures. Of them, some of the commonly used are HashMap, LinkedHashMap, TreeMap, etc.

Note that the following diagram corresponds to the java 7 & 8 collections framework and it is an abstract view of the relevant classes and interfaces. AbstractMap class which is implemented by several concrete classes has been omitted.