Sort an object by an other one.
- by kevinb92
Here's the deal :
I have Publication objets in my application.
I also have Vote objet.
I can add votes on publication. A vote is defined like this, forOrAgainst, LinkedPublication, date, author etc etc...
I want to sort Publication list by number of vote.
What is the best way to link them ?
Should i return a hashmap ? a treeset ?
How do i add…