Enumeration enum = x.getAllScheduleElements();  while (enum.hasMoreElements()) { ScheduleElement se = (ScheduleElement)enum.nextElement();
Enumeration en = x.getAllScheduleElements();  while (en.hasMoreElements()) { ScheduleElement se = (ScheduleElement)en.nextElement();
  public Schedule timeInverse(Schedule x, PlanningFactory ldmf) {    Vector newElem = new Vector();    Date point = new Date(0);    Enumeration enum = x.getAllScheduleElements();    // As I understand it this is getting a enum from an ordered set and is therefore ordered    while (enum.hasMoreElements()) {      ScheduleElement se = (ScheduleElement)enum.nextElement();      if (point.before(se.getStartDate())) {	newElem.addElement((ScheduleElement)new ScheduleElementImpl(point,se.getStartDate()));      }      point = se.getEndDate();    }