mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Merge branch 'master' into master
This commit is contained in:
commit
4c2df19064
3 changed files with 20 additions and 6 deletions
|
|
@ -222,10 +222,13 @@ public class Service extends AbstractJob {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder<T> addAllRequiredSkills(Collection<String> skills) {
|
||||||
|
skillBuilder.addAllSkills(skills);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder<T> addAllRequiredSkills(Skills skills){
|
public Builder<T> addAllRequiredSkills(Skills skills){
|
||||||
for(String s : skills.values()){
|
skillBuilder.addAllSkills(skills.values());
|
||||||
skillBuilder.addSkill(s);
|
|
||||||
}
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -261,10 +261,13 @@ public class Shipment extends AbstractJob {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder addAllRequiredSkills(Collection<String> skills) {
|
||||||
|
skillBuilder.addAllSkills(skills);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder addAllRequiredSkills(Skills skills) {
|
public Builder addAllRequiredSkills(Skills skills) {
|
||||||
for (String s : skills.values()) {
|
addAllRequiredSkills(skills.values());
|
||||||
addRequiredSkill(s);
|
|
||||||
}
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ import com.graphhopper.jsprit.core.problem.job.Break;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of {@link Vehicle}.
|
* Implementation of {@link Vehicle}.
|
||||||
|
|
@ -234,6 +236,12 @@ public class VehicleImpl extends AbstractVehicle {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Builder addAllSkills(Collection<String> skills) {
|
||||||
|
if (skills == null) throw new IllegalArgumentException("Skills of vehicle " + id + " must not be null");
|
||||||
|
skillBuilder.addAllSkills(skills);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public Builder addSkill(String skill) {
|
public Builder addSkill(String skill) {
|
||||||
if (skill == null) throw new IllegalArgumentException("Skill of vehicle " + id + " must not be null");
|
if (skill == null) throw new IllegalArgumentException("Skill of vehicle " + id + " must not be null");
|
||||||
skillBuilder.addSkill(skill);
|
skillBuilder.addSkill(skill);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue