I have an array list of dates spanning for several years i.e. ArrayList<Date> dateList
I have an object that represents a grid of months for each year i.e.
public class DateTileGrid
{
private int mCurrentYear;
private ArrayList<Date> mDateTiles;
... // GETTERS AND SETTERS
}
I want to create an ArrayList<DateTileGrid> that will contain the relevant dates for each year.
I know how to do it with loop (nasty nested loops) but I hope there is a cleaner way to achieve that.