I have some objects with Date parameters. What collection will be best for storing them and later querying for object/objects with particular date ? (like given as a String or java.util.Date format) ?
EDIT:
I was trying to use TofuBear's solution, but cannot make it work. let's say I am calling my function (which returns Map) with a list of objects, and Date object. What next ? I was trying different methods but everything is just bloody red from NetBeans's errors:
public Map<Date, List<Person>> createDateList(Date date, List<Person> list){
Map<Date, List<Person>> map = null;
}
This however does not solve problem of querying, cuz I'm just creating a map with one object. I need to have a list of all objects (which have Date field) and their dates in a map. Am I thinking correctly ?