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;
|
return timeToLeaveToDest;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTimeToLeaveToDest(Date timeToLeaveToDest) {
|
public void setTimeToLeaveToDest(Date timeToLeaveToDest) throws OutOfSimulationTimeException {
|
||||||
//TODO: Hesham check if date is before or after Project Date
|
if(PDate.isValidTime(timeToLeaveToDest))
|
||||||
this.timeToLeaveToDest = timeToLeaveToDest;
|
this.timeToLeaveToDest = timeToLeaveToDest;
|
||||||
|
else throw new OutOfSimulationTimeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Date getTimeToLeaveToHousing() {
|
public Date getTimeToLeaveToHousing() {
|
||||||
return timeToLeaveToHousing;
|
return timeToLeaveToHousing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTimeToLeaveToHousing(Date timeToLeaveToHousing) {
|
public void setTimeToLeaveToHousing(Date timeToLeaveToHousing) throws OutOfSimulationTimeException {
|
||||||
//TODO: Hesham check if date is before or after Project Date
|
if(PDate.isValidTime(timeToLeaveToHousing))
|
||||||
this.timeToLeaveToHousing = timeToLeaveToHousing;
|
this.timeToLeaveToHousing = timeToLeaveToHousing;
|
||||||
|
else throw new OutOfSimulationTimeException();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getNumberOfBusses() {
|
public int getNumberOfBusses() {
|
||||||
|
Loading…
Reference in New Issue
Block a user