We have a data structure that is build from a ResultSet. I intend to keep this data structure in memory and when the presentation requests a sorts on a column, just rearrage the data structure and return for rendering...

Of course, the problem is simple and obvious, what I want is any alternates to the solution that I am currently using which is clogging our ability to come up an alternate better solution which yeilds better result and is also simple.

What I currently have is a TreeMap were the key is column that needs to be sorted (duplicates handled by adding additional redundant token) and the value being a linked list for the corresponding record. The presentation (JSP) is a bit inelegant but this works

Any other directions appreciated :)
Thanks, -k