else
else if (c1 != null)
    private Collection merge(Collection courses) {        ArrayList tmp = new ArrayList();        Iterator i = courses.iterator();        if (i.hasNext()) {	        Course c1 = (Course) i.next();	        Courses cs = new Courses();	        while (i.hasNext()) {	            Course c2 = (Course) i.next();	            	            if (c1.getEndDate().getTimeInMillis() > c2.getBeginDate().getTimeInMillis()) {	                if (cs.getCourses().size() == 0)	                    cs.addCourse(c1);	                cs.addCourse(c2);	            } else {	                if (cs.getCourses().size() != 0) {	                    tmp.add(cs);	                    cs = new Courses();	                }	                tmp.add(c1);	            }	            c1 = c2;	        }	        if (cs.getCourses().size() != 0)                tmp.add(cs);	        else	            tmp.add(c1);        }        return tmp;    }