Java: Sorted collection which allows duplicates, is memory efficient and provides fast insert + update

前端 未结 6 1114
野的像风
野的像风 2020-12-15 05:11

Specifically I need a collection which uses one field A for accessing and a different one (field S) for sorting but a sorted collection which accepts duplicate would be suff

6条回答
  •  鱼传尺愫
    2020-12-15 06:09

    What about guava TreeMultiset? What you asked for: a sorted collection which accepts duplicates. Don't know anything about its performance though.

提交回复
热议问题