Best way to create a hashmap of arraylist

后端 未结 9 1049
小鲜肉
小鲜肉 2020-11-27 05:35

I have one million rows of data in .txt format. the format is very simple. For each row:

user1,value1
user2,value2
user3,value3
user1,value4
...

You k

9条回答
  •  一生所求
    2020-11-27 06:21

    Use Multimap from Google Collections. It allows multiple values for the same key

    https://google.github.io/guava/releases/19.0/api/docs/com/google/common/collect/Multimap.html

提交回复
热议问题