if (addAgain) { frozenTasks.remove (t); frozenTasks.add (t); }
  public void freezeTask (String task, String res, String start, String end) {    Task t = getTask (task);    if (t == null) {      System.out.println ("Trying to freeze unknown task " + task);      return;    }    Assignment a = t.getAssignment();    boolean alreadyFrozen = (a != null) && a.getFrozen();    Resource r = (res != null) ? getResource (res) :                 ((a != null) ? a.getResource() : null);    int s = (start != null) ? timeOps.stringToTime (start) :            ((a != null) ? a.getTaskStartTime() : Integer.MAX_VALUE);    int e = (end != null) ? timeOps.stringToTime (end) :            ((a != null) ? a.getTaskEndTime() : Integer.MIN_VALUE);    if ((r == null) || (s == Integer.MAX_VALUE) || (e == Integer.MIN_VALUE)) {      System.out.println ("Missing data for freezing task " + task);      return;    }    t.setAssignment (new Assignment (t, r, s, s, e, e, true, timeOps));    if (! alreadyFrozen) {      primaryTasks.remove (t);      frozenTasks.add (t);     }  }