converting the below data structure of Map into another data structure in java -
i trying create following data structure:
map<string, map<string, list<string>>>
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"
so have tried please advise me there other way or data structure in can achieve same below functionality through linked list or tree please advise
map<string, map<string, list<string>>> ultimatemap = new hashmap<string,map<string, list<string>>> (); map<string, list<string>> map1 = new hashmap<string, list<string>>(); map1.put ("payername", arrays.aslist("wpn", "wpfnb", "dgeft", "xbthy")); map1.put ("fixedrate", arrays.aslist("dd", "ww", "trrty", "httyure")); map<string, list<string>> map2 = new hashmap<string, list<string>>(); map2.put ("payername", arrays.aslist("ssswpn", "wpfsssnb", "gggdgeft", "xbtyyyyhy")); map2.put ("fixedrate", arrays.aslist("wwdd", "wttyw", "yyyytrrty", "iiihttyure")); ultimatemap.put("b1", map1); ultimatemap.put("b2", map2);
advise me there other way or data structure in can achieve same below functionality through linked list or tree please advise
map<string, map<string, list<string>>> ultimatemap = new hashmap<string,map<string, list<string>>> ();
is way of implementing ultimate map. don't think there can better way.
Comments
Post a Comment