How to sort a treemap based on its values?

前端 未结 9 1017
萌比男神i
萌比男神i 2020-12-01 04:53

How can I sort a treemap using its values rather than the key?

9条回答
  •  隐瞒了意图╮
    2020-12-01 05:22

    Google Guava provides a TreeMultiMap.

    You could also use two collections. What are you trying to accomplish? Can you explain your use cases?

提交回复
热议问题