예제 #1
0
 /** Executes/Redoes the changes of the allocation edit */
 public void execute() {
   allocation.startDate = startDate;
   allocation.endDate = endDate;
   Collections.sort(allocation.getProject().getTeamAllocations());
 }
예제 #2
0
 /** Undoes the changes of the person edit */
 public void undo() {
   allocation.startDate = oldStartDate;
   allocation.endDate = oldEndDate;
   Collections.sort(allocation.getProject().getTeamAllocations());
 }
예제 #3
0
 /**
  * Compares this allocation to another based on the start dates of the allocations
  *
  * @return the comparison of the start dates of the two allocations
  */
 @Override
 public int compareTo(Allocation allocation) {
   LocalDate allocationStartDate = this.getStartDate();
   LocalDate allocation2StarDate = allocation.getStartDate();
   return allocationStartDate.compareTo(allocation2StarDate);
 }