Nishant Yadav

Publication Date

Fall 2023

Degree Type

Master's Project

Degree Name

Master of Science in Computer Science (MSCS)


Computer Science

First Advisor

Robert Chun

Second Advisor

Katerina Potika

Third Advisor

Thomas Austin


MultiMap, OpenJDK, Google Guava


A key-value pair is an elementary data model in which a unique key is associated with a given value. This association between the key and the value allows for a quick lookup of data based on the key and hence is extensively used in programming languages, NoSQL databases, caches, session management, etc. In Java OpenJDK, this elementary data model is implemented by the interface Map, which allows efficient storage and retrieval of data but can only store a single value against each key. In this project, we have implemented a MultiMap data structure in OpenJDK which allows associating multiple values against a single key.

Implementation of the project consists of an interface MultiMap which is further implemented by an abstract class, and finally has three implementations ArrayListMultiMap, SetMultiMap, and TreeMultiMap. Each of these multimaps allows the association of multiple values against a single key and provides some unique properties for the associated values which will be discussed in the implementation part. The AbstractMultiMap class provides us with implementations of some methods and views that allow users to perform operations and queries on data in a multimap.

In the experiments section, we have compared the execution times of inserting different numbers of key-value pairs in various implementations of multimap. Mainly we have considered our implementation of MultiMap in OpenJDK, multimap in Google Guava library, and multimap in C++. From these experiments, we observed that our implementation of MultiMap in OpenJDK provided better performance for primitive datatypes such as Integer and Float, while Google Guava provided better performance for complex data structures such as String.