I have some code with Map
objects, which works (it is instantiated as a HashMap of HashMaps), but I wonder whether there is
Take a look at Guava's Table interface.
Its documentation example seems to overlap quite a bit with your use-case:
Typically, when you are trying to index on more than one key at a time, you will wind up with something like Map
>, which is ugly and awkward to use. Guava provides a new collection type, Table, which supports this use case for any "row" type and "column" type.