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
Optional Replicator mirror
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.
Your face IP:[220.127.116.11]
You are visitor number|