Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Sorting problem

 
Alex Pol
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 179
Chrome Eclipse IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you actually be more clear in your question?
Do you mean that each customer is mapped to 2 manufacturers?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic