mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
add helper to build new vehicle based on another vehicle
This commit is contained in:
parent
9ec84d0e48
commit
3e89111342
1 changed files with 10 additions and 0 deletions
|
|
@ -330,6 +330,16 @@ public class VehicleImpl extends AbstractVehicle {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a simple copy of vehicle.
|
||||
*
|
||||
* @param vehicle
|
||||
* @return
|
||||
*/
|
||||
public static Vehicle copyOf(Vehicle vehicle) {
|
||||
return VehicleImpl.Builder.newInstance(vehicle).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns empty/noVehicle which is a vehicle having no capacity, no type and no reasonable id.
|
||||
* <p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue