SortedMap : Java Glossary



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.

Learning More

Oracle’s Javadoc on SortedMap class : available:

This page is posted
on the web at:

Optional Replicator mirror
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number