java - Converting ArrayList into TreeSet -


i have arraylist<card> cards = new arraylist<card> need convert treeset<card>. purpose do:

new treeset<card>(cards) 

after have size of treeset equal 1. card class implements comparable interface. i'm doing wrong or not doing?

if of cards in arraylist evaluate equal using provided comparable interface (i.e. compare returns 0) end 1 entry in treeset.


Popular posts from this blog

Php - Delimiter must not be alphanumeric or backslash -

c# - How to change the "Applies To" field under folder auditing options programatically (.NET) -

c++ - Ambiguity when using boost::assign::list_of to construct a std::vector -