public static TaskSnapshot deserialize(ObjectInputStream s,NormalTask hasAssignments) throws IOException, ClassNotFoundException {
TaskSnapshot t=new TaskSnapshot();
TaskSchedule schedule=TaskSchedule.deserialize(s);
schedule.setTask(hasAssignments);
t.setCurrentSchedule(schedule);
t.hasAssignments=new HasAssignmentsImpl();//(HasAssignments)s.readObject();
t.setFixedCost(s.readDouble());
t.setFixedCostAccrual(s.readInt());
t.setIgnoreResourceCalendar(s.readBoolean());