I have for example 211 days / 7 = 31 week object or List<Week> with 31 objects.
Now the user of my programm can set the tasks he will do for the next 2 weeks or 3 weeks or 4 weeks. This I call week A. After this 2,3 or 4 or X weeks it changes/rotates and he wants to set other tasks for week 5,6,7,8 and after this everything repeats.
The user must be able to set a weekly rotation from 1 week to 16 weeks. That means the tasks he is doing rotate every week or every 16 weeks...
now I have the 31 week objects and lets assume the user has set a 4 week roation. In the end I want to get 2 lists for week A/B containing 16 and 15 week objects.
How can I read that List<Week> with 31 objects and split it in a GENERIC way so I get 2 Lists with week A/B,
I bet the solution needs many if-clauses, surprise me ;-)