Enumeration enum = aSchedule.getAllScheduleElements(); if(!enum.hasMoreElements()) return false; long last_time = aSchedule.getStartTime()-1; while (enum.hasMoreElements()) { ScheduleElement element = (ScheduleElement)enum.nextElement(); if (element.getStartTime() <= last_time) return true; last_time = element.getEndTime();
if(aSchedule != null) { Enumeration enum = aSchedule.getAllScheduleElements(); if(!enum.hasMoreElements()) return false; long last_time = aSchedule.getStartTime()-1; while (enum.hasMoreElements()) { ScheduleElement element = (ScheduleElement)enum.nextElement(); if (element.getStartTime() <= last_time) return true; last_time = element.getEndTime(); }
   static private boolean isOverlappingSchedule(Schedule aSchedule) {       Enumeration enum = aSchedule.getAllScheduleElements();       if(!enum.hasMoreElements()) return false;        long last_time = aSchedule.getStartTime()-1;       while (enum.hasMoreElements()) {	   ScheduleElement element = (ScheduleElement)enum.nextElement();	   if (element.getStartTime() <= last_time) return true;	   last_time = element.getEndTime();       }