java - Data structure to hold the data into the map into key value pairs -


i trying create data structre

map<string, map<string, list<string>>> 

i have map shown below in there key , values of type list:

 map<string, list<string> newdatamap = new hashmap<>();     map.put ("payername", arrays.aslist("wpn", "wpfnb", "dgeft", "xbthy"));     map.put ("fixedrate", arrays.aslist("dd", "ww", "trrty", "httyure")) 

i'd add map on previous map, such there key , value above map. correct data structure, , how implement it?

i want shown below

key         value  b1          payername  ----> "wpn", "wpfnb", "dgeft", "xbthy"             fixedrate ----->"dd", "ww", "trrty", "httyure"    b2          payername  ----> "ssswpn", "wpfsssnb", "gggdgeft", "xbtyyyyhy"             fixedrate ----->"wwdd", "wttyw", "yyyytrrty", "iiihttyure" 

as shown above, new key has been introduced map, , value previous map. please advise how create such map

map<string, map<string, list<string>>>. 

well have tried through google guava library have shown below want achieve same through java itself. please advise how can achieve same through java

final table<string, string, list<string>> values = hashbasedtable.create(); values.put("b1", "payername", lists.newarraylist("wpn", "wpfnb", "dgeft", "xbthy")); system.out.println(values.get("b1", "payername")); // prints list 

you there:

map<string, map<string, list<string>>> map = new hashmap<> (); map.put("b1", newdatamap); 

Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -

jdbc - Not able to establish database connection in eclipse -