I use a hashtable which contains a
String as a key and an arraylist as a value.
This hashtable is iterated on the
jsp and first the string is displayed, then another iteration takes place for the arraylist for the string key and hence, submenu type of stuffs gets displayed.
Now, i want to display a particular String and its arraylist iterated on the top of the page and the rest as is.
Tree map sorts them, so i was thinking, is it possible to implement a comparator to the tree map which would never compare anything and hence, tree map would retain data in the order it was added and hence, displayed properly.
Can someone advise on this. Please provide a proper code for comparator implemented class
or some other solution for this.
Regards,
Fahad