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:
parent
e8d13ad7aa
commit
6e6218812e
2 changed files with 41 additions and 54 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue