Multi-valued hashtable in Java

前端 未结 13 2087
余生分开走
余生分开走 2020-12-06 09:41

Is it possible to have multiple values for the same key in a hash table? If not, can you suggest any such class or interface which could be used?

13条回答
  •  我在风中等你
    2020-12-06 09:53

    What you're looking for is a Multimap. The google collections api provides a nice implementation of this and much else that's worth learning to use. Highly recommended!

提交回复
热议问题