public class VehicleImpl extends AbstractVehicle
Vehicle.| Modifier and Type | Class and Description |
|---|---|
static class |
VehicleImpl.Builder
Builder that builds the vehicle.
|
static class |
VehicleImpl.NoVehicle
Extension of
VehicleImpl representing an unspecified vehicle with the id 'noVehicle'
(to avoid null). |
AbstractVehicle.AbstractTypeKey| Modifier and Type | Method and Description |
|---|---|
static Vehicle |
copyOf(Vehicle vehicle)
Returns a simple copy of vehicle.
|
static VehicleImpl.NoVehicle |
createNoVehicle()
Returns empty/noVehicle which is a vehicle having no capacity, no type and no reasonable id.
|
boolean |
equals(Object obj)
Two vehicles are equal if they have the same id and if their types are equal.
|
Break |
getBreak() |
double |
getEarliestDeparture()
Returns the earliest departure of vehicle which should be the lower bound of this vehicle's departure times.
|
Location |
getEndLocation() |
String |
getId()
Returns the id of this vehicle.
|
double |
getLatestArrival()
Returns the latest arrival time at this vehicle's end-location which should be the upper bound of this vehicle's arrival times at end-location.
|
Skills |
getSkills() |
Location |
getStartLocation() |
VehicleType |
getType()
Returns the
VehicleType of this vehicle. |
int |
hashCode() |
boolean |
isReturnToDepot()
Returns true if vehicle returns to depot, false otherwise.
|
String |
toString()
Returns String with attributes of this vehicle
|
getIndex, getUserData, getVehicleTypeIdentifier, setIndex, setUserData, setVehicleIdentifierpublic static Vehicle copyOf(Vehicle vehicle)
vehicle - to copypublic static VehicleImpl.NoVehicle createNoVehicle()
NoVehicle has id="noVehicle" and extends VehicleImpl
public String toString()
String has the following format [attr1=val1][attr2=val2]...[attrn=valn]
public double getEarliestDeparture()
Vehiclepublic double getLatestArrival()
Vehiclepublic VehicleType getType()
VehicleVehicleType of this vehicle.VehicleType of this vehiclepublic String getId()
Vehiclepublic boolean isReturnToDepot()
Vehiclepublic Location getStartLocation()
public Location getEndLocation()
public Skills getSkills()
public Break getBreak()
Copyright © 2013–2024. All rights reserved.