private boolean affectationTask(String taskCode, String attribute, Value exp) { final TaskImpl t = getOrCreateTask(taskCode); final TaskAttribute att = TaskAttribute.fromString(attribute); if (att == TaskAttribute.START) { t.setStart(((ValueTime) exp).getValue()); return true; } if (att == TaskAttribute.DURATION) { t.setDuration(((ValueInt) exp).getValue()); return true; } if (att == TaskAttribute.LOAD) { t.setLoad(((ValueInt) exp).getValue()); return true; } throw new UnsupportedOperationException(); }