SortedMap : Java Glossary

*0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ (all)

SortedMap

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:

http://mindprod.com/jgloss/sortedmap.html

Optional Replicator mirror
of mindprod.com
on local hard disk J:

J:\mindprod\jgloss\sortedmap.html
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.

IP:[65.110.21.43]
Your face IP:[3.142.124.119]
You are visitor number