while (activities.hasMoreElements()) { activity = (OrgActivity)activities.nextElement(); end_time = getEndTime(activity); if ((end_time > newET)) { newET = end_time; } start_time = getStartTime(activity); if (start_time < newST) { newST = start_time; } }  if (newET != endTime_ || newST != startTime_) {  synchronized(this) { endTime_ = newET; startTime_ = newST; } } }
    private void updateOPlanTimes() {	long end_time;	long start_time;	OrgActivity activity;	Enumeration activities = orgActivities_.elements();	// initialize endTime/startTime values	if (activities.hasMoreElements()) {	    activity = (OrgActivity)activities.nextElement();	    endTime_ = getEndTime(activity);	    startTime_ = getStartTime(activity);	}	// search for first/last times	while (activities.hasMoreElements()) {	    activity = (OrgActivity)activities.nextElement();	    end_time = getEndTime(activity);	    if ((end_time > endTime_)) {		endTime_ = end_time;	    }	    start_time = getStartTime(activity);	    if (start_time < startTime_) {		startTime_ = start_time;	    }	}    }