java - How to load LinkedHashMap Values into Hashtable -
i have following code:
clienttablelist = new object[dbqueries.getallclients().size()][3]; [i want load 3 records now] linkedhashmap<string, linkedhashmap<string, string>> clienthashmap = dbqueries.getallclients(); system.out.println(clienthashmap.keyset()); //printing values system.out.println(clienthashmap.values());
results:
[bob hope, elena hairr, blossom kraatz, loreen griepentrog] [{userid=2345, givenname=bob, familyname=hope, dateofbirth=august 30, 1963, namesuffix=sr, nameprefix=, email=francoise.rautenstrauch@rautenstrauch.com, phone=519- ...
i need load jtable
, next code is:
for (int = 0; < clienthashmap.size(); i++) { clienttablelist[i] = new object[] { clienthashmap.get("givenname") + " " + clienthashmap.get("familyname"), clienthashmap.get("loginemail") + " ", clienthashmap.get("phone") + " " };
but i'm getting null
clienttablelist
.
i need load values hashtable
load hashtable
clienttablelist
. right?
your clienttablelist
doesn't have fields, values have them:
int = 0; (map<string, string> client: clienthashmap.values()) { clienttablelist[i++] = string.format("%s %s %s %s", client.get("givenname"), client.get("familyname"), client.get("loginemail"), client.get("phone")); };
Comments
Post a Comment