How can I sort a treemap using its values rather than the key?
Google Guava provides a TreeMultiMap.
You could also use two collections. What are you trying to accomplish? Can you explain your use cases?