Sunday, 15 July 2012

java - Message tree list -



java - Message tree list -

i have nice task, , not sure optimized version here. single threaded environment.

in thunderbird, can see messages tree. list of trees. clicking on tree elements can navigate root leaf , back, has other mail service clients, not using others. similar task here: display message list in tree view.

message1 message1.1 message1.2 message1.2.1 message2 message3 message 3.1

and on... have vector<message> mymessages

and message simplified pojo this:

class message{ int id; int parentid; string topic; string content; }

my question simple: info construction should used store tree? linkedhashmap key of mesageid's hs parentid = null ( first message in topic) , value should arraylist has messages? - or nested linkedhashmap?

how store message 1.2.1 easy know parent?

update: listed in gwt / html, not swing

have considered jtrees , underlying treemodel ? it's not clear me if you're looking display info regardless seek , leverage off work since it's feature-rich , looks natural fit problem.

update: you're using gwt, check out gwt tree

java data-structures

No comments:

Post a Comment