MultiMap vs MultiValue Map

后端 未结 4 1518
悲哀的现实
悲哀的现实 2021-01-17 21:40

At one place i have to use a map with many values mapped to a single key, so i was wondering whether there is any significant performance distinction between using H

4条回答
  •  被撕碎了的回忆
    2021-01-17 22:18

    I'd recommend to use google collections if you want to use a more convenient implementation of a Multimap. In case you don't want to introduce a new dependency, HashMap> should do the trick which is pretty much what apache.collections HashMultiMap does.

提交回复
热议问题