@Override public TourActivity duplicate() { return new End(this); }
public static End newInstance(String locationId, double earliestArrival, double latestArrival) { return new End(locationId, earliestArrival, latestArrival); }
public static End copyOf(End end) { return new End(end); }
private Builder(Vehicle vehicle, Driver driver) { super(); this.vehicle = vehicle; this.driver = driver; start = new Start(vehicle.getStartLocation(), vehicle.getEarliestDeparture(), Double.MAX_VALUE); start.setEndTime(vehicle.getEarliestDeparture()); end = new End(vehicle.getEndLocation(), 0.0, vehicle.getLatestArrival()); }
public static End newInstance(String locationId, double earliestArrival, double latestArrival) { return new End(locationId, earliestArrival, latestArrival); }
@Override public TourActivity duplicate() { return new End(this); }
public static End copyOf(End end) { return new End(end); }
public class Main extends javax.swing.JFrame { End myend = new End();
End end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival());
private void setStartAndEnd(Vehicle vehicle, double vehicleDepTime) { if (!(vehicle instanceof VehicleImpl.NoVehicle)) { if (start == null && end == null) { start = new Start(vehicle.getStartLocation(), vehicle.getEarliestDeparture(), vehicle.getLatestArrival()); end = new End(vehicle.getEndLocation(), vehicle.getEarliestDeparture(), vehicle.getLatestArrival()); } start.setEndTime(Math.max(vehicleDepTime, vehicle.getEarliestDeparture())); start.setTheoreticalEarliestOperationStartTime(vehicle.getEarliestDeparture()); start.setTheoreticalLatestOperationStartTime(vehicle.getLatestArrival()); start.setLocation(vehicle.getStartLocation()); end.setLocation(vehicle.getEndLocation()); end.setTheoreticalEarliestOperationStartTime(vehicle.getEarliestDeparture()); end.setTheoreticalLatestOperationStartTime(vehicle.getLatestArrival()); } }
End end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival());
start.setEndTime(newVehicleDepartureTime); End end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival());
End end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival()); ActivityContext pickupContext = new ActivityContext(); TourActivity prevAct = start;
private void initialiseStartAndEnd(final Vehicle newVehicle, double newVehicleDepartureTime) { if (start == null) { start = new Start(newVehicle.getStartLocation(), newVehicle.getEarliestDeparture(), Double.MAX_VALUE); start.setEndTime(newVehicleDepartureTime); } else { start.setLocation(Location.newInstance(newVehicle.getStartLocation().getId())); start.setTheoreticalEarliestOperationStartTime(newVehicle.getEarliestDeparture()); start.setTheoreticalLatestOperationStartTime(Double.MAX_VALUE); start.setEndTime(newVehicleDepartureTime); } if (end == null) { end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival()); } else { end.setLocation(Location.newInstance(newVehicle.getEndLocation().getId())); end.setTheoreticalEarliestOperationStartTime(0.0); end.setTheoreticalLatestOperationStartTime(newVehicle.getLatestArrival()); } }
private Builder(Vehicle vehicle, Driver driver) { super(); this.vehicle = vehicle; this.driver = driver; start = new Start(vehicle.getStartLocation(), vehicle.getEarliestDeparture(), Double.MAX_VALUE); start.setEndTime(vehicle.getEarliestDeparture()); end = new End(vehicle.getEndLocation(), 0.0, vehicle.getLatestArrival()); }
private void setStartAndEnd(Vehicle vehicle, double vehicleDepTime) { if (!(vehicle instanceof VehicleImpl.NoVehicle)) { if (start == null && end == null) { start = new Start(vehicle.getStartLocation(), vehicle.getEarliestDeparture(), vehicle.getLatestArrival()); end = new End(vehicle.getEndLocation(), vehicle.getEarliestDeparture(), vehicle.getLatestArrival()); } start.setEndTime(Math.max(vehicleDepTime, vehicle.getEarliestDeparture())); start.setTheoreticalEarliestOperationStartTime(vehicle.getEarliestDeparture()); start.setTheoreticalLatestOperationStartTime(vehicle.getLatestArrival()); start.setLocation(vehicle.getStartLocation()); end.setLocation(vehicle.getEndLocation()); end.setTheoreticalEarliestOperationStartTime(vehicle.getEarliestDeparture()); end.setTheoreticalLatestOperationStartTime(vehicle.getLatestArrival()); } }
End end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival());
End end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival());
start.setEndTime(newVehicleDepartureTime); End end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival());
private void initialiseStartAndEnd(final Vehicle newVehicle, double newVehicleDepartureTime) { if (start == null) { start = new Start(newVehicle.getStartLocation(), newVehicle.getEarliestDeparture(), Double.MAX_VALUE); start.setEndTime(newVehicleDepartureTime); } else { start.setLocation(Location.newInstance(newVehicle.getStartLocation().getId())); start.setTheoreticalEarliestOperationStartTime(newVehicle.getEarliestDeparture()); start.setTheoreticalLatestOperationStartTime(Double.MAX_VALUE); start.setEndTime(newVehicleDepartureTime); } if (end == null) { end = new End(newVehicle.getEndLocation(), 0.0, newVehicle.getLatestArrival()); } else { end.setLocation(Location.newInstance(newVehicle.getEndLocation().getId())); end.setTheoreticalEarliestOperationStartTime(0.0); end.setTheoreticalLatestOperationStartTime(newVehicle.getLatestArrival()); } }