so i want to have Chat-Elements stored in a Collections and I still don't know what Collections to use. It is just like the Chatlist of WhatsApp where it is sorted by date but properties/parameters of each chat can change anytime (chat muted/marked ... )
- Elements (ID, Date, different parameters)
Needs to be sorted by date [all the time]
=> TreeSet is optimal
No duplicate entries allowed [doesnt happen often]
=> Treeset is optimal
Parameters are changing [all the time]
(Iterating by Id, setting specific parameters)
=> I think ArrayList is the better option
Android App, Less memory usage is preferable
=> Arraylist is optimal
Currently I am using Arraylists but Im not really sure if Point 4 is true and if so, if it is that relevant.