I have the following Java
POJO:
public class Meeting {
private String id;
private String startDateAndTime;
private String endDateAndTime;
private int recurrenceTimes;
private String reccurenceType;
//getters and setters etc
}
This is essentially a high level view of a Meeting. I.e:
Meeting Id
First startDateAndTime
First endDateAndTime
How often it reccurs: recurrenceTimes
Recurrence Type: I.e. daily weekly etc
I would like to break this object down into the series of individual meetings, i.e. if the recurrence times was 5 and the type was "daily" then the first object will contain the original Start and End dateAndTimes and the 4 subsequent times will be dynamically generated to be at the same times but their start and end dateAndTimes will be on the days after this.
What would be the best way to do so?
I started the logic by looping
on amount of recurrenceTimes but I am confused as to how to create the subsequent strucutures
int recurrenceTimes= meeting.getRecurrenceTimes;
//Create Single Meeting Objects
for(int i=0; i<=recurrenceTimes i++){
String firstStartDate = meeting.getStartDate();
String firstEndDate = meeting.getEndDate();
//logic to create the subsqeuent Meeting Objects
}