org.optaplanner.examples.vehiclerouting.domain
Class Customer
java.lang.Object
org.optaplanner.examples.common.domain.AbstractPersistable
org.optaplanner.examples.vehiclerouting.domain.Customer
- All Implemented Interfaces:
- Serializable, Comparable<AbstractPersistable>, Standstill
- Direct Known Subclasses:
- TimeWindowedCustomer
public class Customer
- extends AbstractPersistable
- implements Standstill
- See Also:
- Serialized Form
location
protected Location location
demand
protected int demand
previousStandstill
protected Standstill previousStandstill
nextCustomer
protected Customer nextCustomer
vehicle
protected Vehicle vehicle
Customer
public Customer()
getLocation
public Location getLocation()
- Specified by:
getLocation
in interface Standstill
- Returns:
- never null
setLocation
public void setLocation(Location location)
getDemand
public int getDemand()
setDemand
public void setDemand(int demand)
getPreviousStandstill
public Standstill getPreviousStandstill()
setPreviousStandstill
public void setPreviousStandstill(Standstill previousStandstill)
getNextCustomer
public Customer getNextCustomer()
- Specified by:
getNextCustomer
in interface Standstill
- Returns:
- sometimes null
setNextCustomer
public void setNextCustomer(Customer nextCustomer)
- Specified by:
setNextCustomer
in interface Standstill
getVehicle
public Vehicle getVehicle()
- Specified by:
getVehicle
in interface Standstill
- Returns:
- sometimes null
setVehicle
public void setVehicle(Vehicle vehicle)
getDistanceToPreviousStandstill
public int getDistanceToPreviousStandstill()
- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
getDistanceTo
public int getDistanceTo(Standstill standstill)
- Parameters:
standstill
- never null
- Returns:
- a positive number, the distance multiplied by 1000 to avoid floating point arithmetic rounding errors
toString
public String toString()
- Overrides:
toString
in class AbstractPersistable
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.