File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Map with duplicate keys

 
Ria Mathur
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a Map implementation that allows duplicate keys? I wand to use it for storing parameters and their values, and some parameters can have same names.
 
John Lee
Ranch Hand
Posts: 2545
 
Don Kiddick
Ranch Hand
Posts: 580
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I answered this here
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could make the data portion a List and store multiple entries that way. If the Map already contains a key then you could simply add the additional String to the List.
[smilies inserted by Beth(me!)]
[ May 29, 2003: Message edited by: Thomas Paul ]
 
John Lee
Ranch Hand
Posts: 2545
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here is another link. it is about c++, but the idea should remain the same.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic