I want to create a HashMap<String, HashMap<String, Long>>
I know in guava we have HashMultimap which is HashMap<String, HashSet<String>
but do we have some support for HashMap<String, HashMap<String, Long>> as well??
yes i can do that in core java, just looking for some library where i won’t have to check that a key exists everytime
I am explaining my problem with an example::
We have a device manufacturer, device name and device rank
now i need to return
list of devices for requested manufacturer – fewer requests
rank for particular device and manufacturer – lots of requests
In my case list of manufacturer and list of devices per manufacturer are quite big
any suggestion for an alternate datastructure is also welcomed.
It sounds like you might want a
Table– possibly aHashBasedTable<String, String, Long>.