How to sort guava multimap? (KEY=DATE)

后端 未结 1 1544
后悔当初
后悔当初 2021-01-12 06:47

I have a

Multimap multimap = ArrayListMultimap.create();

from guava. I was wondering how to SORT the the Date key in t

相关标签:
1条回答
  • 2021-01-12 07:26

    Guava team member here.

    Use TreeMultimap, or if you need to map into Lists, use MultimapBuilder:

    return MultimapBuilder.treeKeys().arrayListValues().build()
    
    0 讨论(0)
提交回复
热议问题