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

add helper methods - related to #380

This commit is contained in:
oblonski 2017-10-23 22:16:10 +02:00
parent 26a7ce5422
commit d573146e35
No known key found for this signature in database
GPG key ID: 179DE487285680D1
2 changed files with 15 additions and 1 deletions

View file

@ -232,7 +232,7 @@ public class Service extends AbstractJob {
public Builder<T> addAllSizeDimensions(Capacity size){
for(int i=0;i<size.getNuOfDimensions();i++){
capacityBuilder.addDimension(i,size.get(i));
addSizeDimension(i, size.get(i));
}
return this;
}

View file

@ -235,6 +235,13 @@ public class Shipment extends AbstractJob {
return this;
}
public Builder addAllSizeDimensions(Capacity size) {
for (int i = 0; i < size.getNuOfDimensions(); i++) {
addSizeDimension(i, size.get(i));
}
return this;
}
/**
* Builds the shipment.
@ -257,6 +264,13 @@ public class Shipment extends AbstractJob {
return this;
}
public Builder addAllRequiredSkills(Skills skills) {
for (String s : skills.values()) {
addRequiredSkill(s);
}
return this;
}
public Builder setName(String name) {
this.name = name;
return this;