I have a datastructure as following:- Key - Value S1 - 23 S6 - 12 S3 - 4 S4 - 7
I have to sort on values. I want the key object S3 as its value is the least. How to go about this? I have already done that using TreeMap, but indirectly as TreeMap sorts on Key and not on value. I am looking for straightforward solution if any. Actually S1,S2... are servers and values are number of user connected to it. For doing loadbalancing I am doing this and want the least loaded server. Thanks Bhushan "The information in this e-mail, and any attachment therein, is confidential and for use by the addressee only. If you are not the intended recipient, please return the e-mail to the sender and delete it from your computer. Although The Bank of New York attempts to sweep e-mail and attachments for viruses, it does not guarantee that either are virus-free and accepts no liability for any damage sustained as a result of viruses." ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
