ItEr33S14CUCreacionUnidadesPlanificacion: The StartConstraintType indicates if an associated date is required

This commit is contained in:
Óscar González Fernández 2009-11-08 21:42:16 +01:00
parent 8eb8e47c47
commit 625b06b2c8

View file

@ -24,25 +24,35 @@ package org.navalplanner.business.planner.entities;
* @author Óscar González Fernández <ogonzalez@igalia.com>
*/
public enum StartConstraintType {
AS_SOON_AS_POSSIBLE {
AS_SOON_AS_POSSIBLE(false) {
@Override
public StartConstraintType newTypeAfterMoved() {
return START_NOT_EARLIER_THAN;
}
},
START_NOT_EARLIER_THAN {
START_NOT_EARLIER_THAN(true) {
@Override
public StartConstraintType newTypeAfterMoved() {
return START_NOT_EARLIER_THAN;
}
},
START_IN_FIXED_DATE {
START_IN_FIXED_DATE(true) {
@Override
public StartConstraintType newTypeAfterMoved() {
return START_NOT_EARLIER_THAN;
}
};
private boolean dateRequired;
private StartConstraintType(boolean dateRequired) {
this.dateRequired = dateRequired;
}
public abstract StartConstraintType newTypeAfterMoved();
public boolean isAssociatedDateRequired() {
return dateRequired;
}
}