if (previous == null) { break; }
  private Vector generateInactiveProjections(Inventory inventory, int switchoverDay) {    printDebug("STEP 2:  GenerateInactiveProjections() for "+AssetUtils.getAssetIdentifier(inventory));    Vector projections = new Vector();    InventoryPG invpg = inventory.getInventoryPG();    int today = invpg.getFirstPlanningDay();    int periodBegin = today;    Scalar previous = invpg.getProjected(periodBegin);    /* Loop from tomorrow to the switchover day. The extra step at     * the end insures that the final segment is processed. */    for (int day = today + 1; day <= switchoverDay; day++) {      Scalar current = (day < switchoverDay) ? invpg.getProjected(day) : null;      if (!previous.equals(current)) {	double value = convertScalarToDouble(previous);	if (!Double.isNaN(value) && value > 0.0) {	  long start = invpg.getStartOfDay(periodBegin);	  int nDays = day - periodBegin;	  long end = start + nDays * TimeUtils.MSEC_PER_DAY;	  Rate dailyRate = createDailyRate(previous);	  Task t = newProjectSupplyTask(inventory, start, end, dailyRate);	  projections.add(t);	}	previous = current;	periodBegin = day;      }    }    return projections;  }