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:
parent
26a7ce5422
commit
d573146e35
2 changed files with 15 additions and 1 deletions
|
|
@ -232,7 +232,7 @@ public class Service extends AbstractJob {
|
||||||
|
|
||||||
public Builder<T> addAllSizeDimensions(Capacity size){
|
public Builder<T> addAllSizeDimensions(Capacity size){
|
||||||
for(int i=0;i<size.getNuOfDimensions();i++){
|
for(int i=0;i<size.getNuOfDimensions();i++){
|
||||||
capacityBuilder.addDimension(i,size.get(i));
|
addSizeDimension(i, size.get(i));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,13 @@ public class Shipment extends AbstractJob {
|
||||||
return this;
|
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.
|
* Builds the shipment.
|
||||||
|
|
@ -257,6 +264,13 @@ public class Shipment extends AbstractJob {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder addAllRequiredSkills(Skills skills) {
|
||||||
|
for (String s : skills.values()) {
|
||||||
|
addRequiredSkill(s);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder setName(String name) {
|
public Builder setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
return this;
|
return this;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue