If you have been using a HashMap and discover you also need the pairs in sorted order, you may have disovered the code you need is rather convoluted. Instead use a SortedMap interface e.g. TreeMap which gives you both the Map lookup and the sorted set. TreeMap maintains all the keys in order at all times which usually takes more overhead that sorting the keys once at the end as you would do exporting a HashMap.
This page is posted |
http://mindprod.com/jgloss/sortedmap.html | |
Optional Replicator mirror
|
J:\mindprod\jgloss\sortedmap.html | |
Please read the feedback from other visitors,
or send your own feedback about the site. Contact Roedy. Please feel free to link to this page without explicit permission. | ||
Canadian
Mind
Products
IP:[65.110.21.43] Your face IP:[3.145.97.235] |
| |
Feedback |
You are visitor number | |