}
final DateTime intervalEnd = interval.getEnd();
if (intervalEnd.isBefore(startDateToSearch.toDateTimeAtMidnight())) {
return false;
}
final HourMinuteSecond b = getBeginHourMinuteSecond();
final HourMinuteSecond e = getEndHourMinuteSecond();
for (final YearMonthDay yearMonthDay : getAllValidLessonDatesWithoutInstancesDates(startDateToSearch, endDateToSearch)) {
final DateTime start =
new DateTime(yearMonthDay.getYear(), yearMonthDay.getMonthOfYear(), yearMonthDay.getDayOfMonth(),
b.getHour(), b.getMinuteOfHour(), b.getSecondOfMinute(), 0);
if (start.isAfter(intervalEnd)) {
continue;
}
final DateTime end =
new DateTime(yearMonthDay.getYear(), yearMonthDay.getMonthOfYear(), yearMonthDay.getDayOfMonth(),
e.getHour(), e.getMinuteOfHour(), e.getSecondOfMinute(), 0);
if (end.isBefore(intervalStart)) {
continue;
}
return true;
}