wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Sorting problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Sorting problem" Watch "Sorting problem" New topic
Author

Sorting problem

Alex Pol
Ranch Hand

Joined: Sep 29, 2006
Posts: 33
I have a map in which the key is a customerId (a String), and the value is a collection of objects of type T, which have an attribute BigDecimal "value" and another attribute String "manufacturer" which can take 2 values: "manuf1" and "manuf2".

I want to obtain the top 10 of customers, and to display for each the total "value", the value for manuf1 and the value for manuf2 (these are sums of course)

Any ideas are appreciated.

Thanks
Ravikanth kolli
Ranch Hand

Joined: Feb 10, 2008
Posts: 179

Can you actually be more clear in your question?
Do you mean that each customer is mapped to 2 manufacturers?


-kolli
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sorting problem