ItEr15S12RFComportamentoGraficoPlanificadorItEr14S13: Adding new dependency types START_START and END_END.
This commit is contained in:
parent
f4a6016874
commit
6f3a245586
1 changed files with 24 additions and 2 deletions
|
|
@ -6,9 +6,7 @@ import java.util.Date;
|
|||
* This enum tells the type of a depepdency. Each instance contanins the correct
|
||||
* behaviour for that type of dependency . <br/>
|
||||
* Created at Apr 24, 2009
|
||||
*
|
||||
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
||||
*
|
||||
*/
|
||||
public enum DependencyType {
|
||||
|
||||
|
|
@ -35,6 +33,30 @@ public enum DependencyType {
|
|||
Date current) {
|
||||
return getBigger(originalTask.getEndDate(), current);
|
||||
}
|
||||
},
|
||||
START_START {
|
||||
|
||||
@Override
|
||||
public Date calculateEndDestinyTask(TaskBean originTask, Date current) {
|
||||
return current;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date calculateStartDestinyTask(TaskBean originTask, Date current) {
|
||||
return getBigger(originTask.getBeginDate(), current);
|
||||
}
|
||||
},
|
||||
END_END {
|
||||
|
||||
@Override
|
||||
public Date calculateEndDestinyTask(TaskBean originTask, Date current) {
|
||||
return getBigger(originTask.getEndDate(), current);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Date calculateStartDestinyTask(TaskBean originTask, Date current) {
|
||||
return current;
|
||||
}
|
||||
};
|
||||
|
||||
private static Date getBigger(Date date1, Date date2) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue