Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sorting a HashMap containing Pair/tuple

978140Jan 15 2013 — edited Jan 16 2013
Hi. I am trying to sort a HashMap looking like this:
Map<String,Pair<Double,Double>>
For sorting it with the "key", all I needed to do was to make a TreeSet of it.
But any hints on how I can sort it on both my pair.getFirst() and another sort for pair.getSecond()?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 13 2013
Added on Jan 15 2013
5 comments
735 views