hi,
I have a method which looks like this
public void setDayIntervals(Days day, List<HourRange> ranges) {
int hourMask = 0;
for (HourRange intRange : ranges) {
int Start= intRange.getStart();
int end = intRange.getEnd();
}
}
}
I have to pass List of Ranges from another class.
for(int s = 0; s < adSchedule.getTargets().length ; s++ ){
List<HourRange> ranges = null;
int Start = adSchedule.getTargets(s).getStartHour();
int end = adSchedule.getTargets(s).getEndHour()-1;
if(adSchedule.getTargets(s).getDayOfWeek()==DayOfWeek.MONDAY ){
// ranges ????????? here i have to pass values Start and End
CamSchedule.setDayIntervals(Days.ONE, ranges);
}
}
Can someone tell me how to pass ranges in the above method setDayIntervals(Days.one, ramges)
public static class HourRange {
int start;
int end;
public HourRange(int start, int end) {
super();
if(start > end)
throw new IllegalArgumentException();
this.start = start;
this.end = end;
}
public int getStart() {
return start;
}
public int getEnd() {
return end;
}
}