tasks.add(newTasks.nextElement());
Task task = (Task)newTasks.nextElement(); if (task.getPlanElement() != null) { System.err.println("Packer: Unable to pack - " + task.getUID() + " - task already has a PlanElement - " + task.getPlanElement() + ".\n" + "Is the UniversalAllocator also handling Supply tasks in this node?"); } else { tasks.add(task); }
  public void processNewTasks(Enumeration newTasks) {    ArrayList tasks = new ArrayList();    while (newTasks.hasMoreElements()) {      tasks.add(newTasks.nextElement());    }    if (tasks.size() == 0) {      return;    }       doPacking(getAggregationClosure(tasks), tasks,              getSortFunction(), getPreferenceAggregator(),              getAllocationResultDistributor());  }