mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
clean TourActivities - remove redundant code
This commit is contained in:
parent
ba75c095de
commit
e9a3f98671
1 changed files with 0 additions and 10 deletions
|
|
@ -145,12 +145,6 @@ public class TourActivities {
|
||||||
activityRemoved = true;
|
activityRemoved = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(c instanceof ServiceActivity){
|
|
||||||
if(job.equals(((ServiceActivity) c).getJob())){
|
|
||||||
tourActivities.remove(c);
|
|
||||||
activityRemoved = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if(jobRemoved != activityRemoved) throw new IllegalStateException("job removed, but belonging activity not.");
|
if(jobRemoved != activityRemoved) throw new IllegalStateException("job removed, but belonging activity not.");
|
||||||
return activityRemoved;
|
return activityRemoved;
|
||||||
|
|
@ -177,14 +171,10 @@ public class TourActivities {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addJob(TourActivity act) {
|
private void addJob(TourActivity act) {
|
||||||
|
|
||||||
if(act instanceof JobActivity){
|
if(act instanceof JobActivity){
|
||||||
Job job = ((JobActivity) act).getJob();
|
Job job = ((JobActivity) act).getJob();
|
||||||
jobs.add(job);
|
jobs.add(job);
|
||||||
}
|
}
|
||||||
else if(act instanceof ServiceActivity){
|
|
||||||
jobs.add(((ServiceActivity) act).getJob());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int jobSize() {
|
public int jobSize() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue