I have a list of objects List<SingleDay> where SingleDay is
class SingleDay{
private Date date;
private String County;
// otherstuff
}
Im looking to convert this list into a Map<Date, Map<String, SingleDay>>. That is, I want a map from Date to a map of Counties back to the original object.
For example:
02/12/2020 : { "Rockbridge": {SingleDayObject}}
I have not been able to get anything to work and everything I found online if from a list of objects to a map, not a list of objects to a nested map.
Basically, I want to be able to quickly query the object that corresponds to the date and county.
Thanks!