1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

simplify job building

This commit is contained in:
oblonski 2015-10-29 10:21:00 +01:00
parent e8d13ad7aa
commit 6e6218812e
2 changed files with 41 additions and 54 deletions

View file

@ -175,6 +175,20 @@ public class Service extends AbstractJob {
this.name = name;
return this;
}
public Builder<T> addAllRequiredSkills(Skills skills){
for(String s : skills.values()){
skillBuilder.addSkill(s);
}
return this;
}
public Builder<T> addAllSizeDimensions(Capacity size){
for(int i=0;i<size.getNuOfDimensions();i++){
capacityBuilder.addDimension(i,size.get(i));
}
return this;
}
}