Sort an object by an other one.

Posted by kevinb92 on Stack Overflow See other posts from Stack Overflow or by kevinb92
Published on 2010-04-22T09:05:03Z Indexed on 2010/04/22 9:13 UTC
Read the original article Hit count: 108

Filed under:
|

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 votes to publication.

It's kinda messy in my brain now...

© Stack Overflow or respective owner

Related posts about java

Related posts about sorting