Is there a built-in library or some other libraries which do the following hashmap implementation?
Let's suppose we want to add the following sets to be inserted as
1 2 3 4 5
1 3 5
1 2 4
2 3
I found if I had to go to just one level, I could use Multimap given in Multimap.
However, my requirement is as,
if I put using map, it should be something like,
1 -> 2 -> 3 -> 4 -> 5
-> 4
-> 3 -> 5
2 -> 3
So, if I have the key 1, it should put the next that comes with 1 into the same key value and then add 2 into the next level.
Is there implementation like this in java?