synchronized (task) { Enumeration taskPrefs = task.getPreferences(); while (taskPrefs.hasMoreElements()) { Preference aPref = (Preference) taskPrefs.nextElement(); if (aPref.getAspectType() == AspectType.START_TIME) { ScoringFunction sf = aPref.getScoringFunction(); return (long) sf.getBest().getValue(); } } } return 0L;
synchronized (task) { Enumeration taskPrefs = task.getPreferences(); while (taskPrefs.hasMoreElements()) { Preference aPref = (Preference) taskPrefs.nextElement(); if (aPref.getAspectType() == AspectType.START_TIME) { ScoringFunction sf = aPref.getScoringFunction(); return (long) sf.getBest().getValue(); } }
    protected long getStartTimePref (Task task) {	synchronized (task) {	    Enumeration taskPrefs = task.getPreferences();	    while (taskPrefs.hasMoreElements()) {		Preference aPref = (Preference) taskPrefs.nextElement();		if (aPref.getAspectType() == AspectType.START_TIME) {		    ScoringFunction sf = aPref.getScoringFunction();		    return (long) sf.getBest().getValue();		}	    }	}	return 0L;    }