Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hash-map with allow duplicate keys ?

 
Ricardo Polero
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi:
In order to implemente a chach I looking for a HashTable-like structure with allow duplicate keys. I planned to overwrite some method , but first I want to know other opinions, links, etc for open source
Thanks in advance
 
Peter den Haan
author
Ranch Hand
Posts: 3252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The normal Collections framework will do - what about a HashMap mapping to an ArrayList (or LinkedList) of objects? That would give the 1:n mapping you appear to need.
- Peter
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!