list, set or map ?
I have a collection of projects.
A project contains a projectname, customername, adress, contractnr, startdate, duration, ......
The intention is to show them into a calendarview.
There are about 50 projects a year.
The projects are serialized.
Do i have to put them into an arraylist, hashset or a map ?
Do you have duplicate projects in your collection? If so use a List otherwise a Set is fine. If you want to associate the projects with something use a Map.
Originally Posted by Dipke
Exactly, look up the APIs for the List, Map and Set interfaces, get familiar with their their modus operandi, it should become pretty clear what interface to use in certain contexts.
Thanks for the answers,
Now i have an idea of what using.