for (Enumeration e = task.getPreferences(); e.hasMoreElements(); ) { Preference pref = (Preference) e.nextElement(); AspectValue best = pref.getScoringFunction().getBest().getAspectValue(); avs.add(best.clone());
synchronized (task) { for (Enumeration e = task.getPreferences(); e.hasMoreElements(); ) { Preference pref = (Preference) e.nextElement(); AspectValue best = pref.getScoringFunction().getBest().getAspectValue(); avs.add(best.clone()); }
  private AspectValue[] getAspectValuesOfTask(Task task) {    List avs = new ArrayList();    for (Enumeration e = task.getPreferences(); e.hasMoreElements(); ) {      Preference pref = (Preference) e.nextElement();      AspectValue best = pref.getScoringFunction().getBest().getAspectValue();      avs.add(best.clone());    }    return (AspectValue[]) avs.toArray(new AspectValue[avs.size()]);  }