Looking for a sorted collection with double entries...
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Tanja_Schmidt
Posted On:   Thursday, November 28, 2002 06:41 AM

Hello!



I need a collection, where I can put key-value-entries in a sorted way (the key does contain the interface comparable!). I can't use TreeMap, because I may insert the same key twice but with different value.

Is there something I can use for this?

Re: Looking for a sorted collection with double entries...

Posted By:   AlessandroA_Garbagnati  
Posted On:   Friday, November 29, 2002 12:26 AM

Tanja,

just my two cents...


You can use a Set (or a List) instead of your value. Inside that collection, you can insert any value you need to map to that specific key.

I know that this seems odd, and hard to code, but it could be a possible scenario.

Re: Looking for a sorted collection with double entries...

Posted By:   Jeanne_Boyarsky  
Posted On:   Thursday, November 28, 2002 03:07 PM

Try java.util.Treeset
About | Sitemap | Contact