commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Colebourne <scolebou...@btopenworld.com>
Subject Re: [Collections] key Value Pair allowing duplicates
Date Thu, 20 Jul 2006 20:28:56 GMT
Look at the MultiMap interface and the MultiValueMap implementation (v3.2).

Stephen


Rajat Sharma wrote:
> HI all,
> 
>  
> 
> Let's say I have a view in the DB which send me back the following
> values
> 
>  
> 
> CUSTNAME      IPADDRESS
> 
> A                      1
> 
> A                      2
> 
> A                      1
> 
> B                      5
> 
> B                      5
> 
>  
> 
> This table is present in the resultSet I get back from the Database.
> But, I wanted the above to be put into some kind of collection (which
> would also allow duplicates). 
> 
>  
> 
> Now, most of the collections do not allow duplicate keys. I want a way
> where I am doing something like MyCollection.getListByKey("CUSTNAME").
> 
>  
> 
> The result is returned into a list.
> 
>  
> 
> What's the best way to achieve this ? 
> 
>  
> 
> Thanks 
> 
> Raj
> 
>             
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message