Campaign check for valid leave date
Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
parent
3ae32ebb11
commit
eb9223b2c2
@ -52,18 +52,20 @@ public class Campaign {
|
||||
return timeToLeaveToDest;
|
||||
}
|
||||
|
||||
public void setTimeToLeaveToDest(Date timeToLeaveToDest) {
|
||||
//TODO: Hesham check if date is before or after Project Date
|
||||
this.timeToLeaveToDest = timeToLeaveToDest;
|
||||
public void setTimeToLeaveToDest(Date timeToLeaveToDest) throws OutOfSimulationTimeException {
|
||||
if(PDate.isValidTime(timeToLeaveToDest))
|
||||
this.timeToLeaveToDest = timeToLeaveToDest;
|
||||
else throw new OutOfSimulationTimeException();
|
||||
}
|
||||
|
||||
public Date getTimeToLeaveToHousing() {
|
||||
return timeToLeaveToHousing;
|
||||
}
|
||||
|
||||
public void setTimeToLeaveToHousing(Date timeToLeaveToHousing) {
|
||||
//TODO: Hesham check if date is before or after Project Date
|
||||
this.timeToLeaveToHousing = timeToLeaveToHousing;
|
||||
public void setTimeToLeaveToHousing(Date timeToLeaveToHousing) throws OutOfSimulationTimeException {
|
||||
if(PDate.isValidTime(timeToLeaveToHousing))
|
||||
this.timeToLeaveToHousing = timeToLeaveToHousing;
|
||||
else throw new OutOfSimulationTimeException();
|
||||
}
|
||||
|
||||
public int getNumberOfBusses() {
|
||||
|
Loading…
Reference in New Issue
Block a user