MATSIM
DepartureImpl.java
Go to the documentation of this file.
1 /* *********************************************************************** *
2  * project: org.matsim.*
3  * Departure.java
4  * *
5  * *********************************************************************** *
6  * *
7  * copyright : (C) 2009 by the members listed in the COPYING, *
8  * LICENSE and WARRANTY file. *
9  * email : info at matsim dot org *
10  * *
11  * *********************************************************************** *
12  * *
13  * This program is free software; you can redistribute it and/or modify *
14  * it under the terms of the GNU General Public License as published by *
15  * the Free Software Foundation; either version 2 of the License, or *
16  * (at your option) any later version. *
17  * See also COPYING, LICENSE and WARRANTY file *
18  * *
19  * *********************************************************************** */
20 
21 package org.matsim.pt.transitSchedule;
22 
23 import org.matsim.api.core.v01.Id;
27 import org.matsim.vehicles.Vehicle;
28 
29 
35 public class DepartureImpl implements Departure {
36 
37  private final Id<Departure> id;
38  private final double departureTime;
39  private Id<Vehicle> vehicleId = null;
40  private final Attributes attributes = new AttributesImpl();
41 
42  protected DepartureImpl(final Id<Departure> id, final double departureTime) {
43  this.id = id;
44  this.departureTime = departureTime;
45  }
46 
47  @Override
48  public Id<Departure> getId() {
49  return this.id;
50  }
51 
52  @Override
53  public double getDepartureTime() {
54  return this.departureTime;
55  }
56 
57  @Override
58  public void setVehicleId(final Id<Vehicle> vehicleId) {
59  this.vehicleId = vehicleId;
60  }
61 
62  @Override
64  return this.vehicleId;
65  }
66 
67  @Override
69  return this.attributes;
70  }
71 
72  @Override
73  public String toString() {
74  return "[DepartureImpl: id=" + this.id + ", depTime=" + this.departureTime + "]";
75  }
76 
77 }
DepartureImpl(final Id< Departure > id, final double departureTime)
void setVehicleId(final Id< Vehicle > vehicleId)