MATSIM
vehicles
VehicleImpl.java
Go to the documentation of this file.
1
/* *********************************************************************** *
2
* project: org.matsim.*
3
* *
4
* *********************************************************************** *
5
* *
6
* copyright : (C) 2011 by the members listed in the COPYING, *
7
* LICENSE and WARRANTY file. *
8
* email : info at matsim dot org *
9
* *
10
* *********************************************************************** *
11
* *
12
* This program is free software; you can redistribute it and/or modify *
13
* it under the terms of the GNU General Public License as published by *
14
* the Free Software Foundation; either version 2 of the License, or *
15
* (at your option) any later version. *
16
* See also COPYING, LICENSE and WARRANTY file *
17
* *
18
* *********************************************************************** */
19
20
package
org.matsim.vehicles;
21
22
import
org
.
matsim
.
api
.
core
.
v01
.
Id
;
23
import
org
.
matsim
.
core
.
gbl
.
Gbl
;
24
import
org
.
matsim
.
utils
.
objectattributes
.
attributable
.
Attributes
;
25
import
org
.
matsim
.
utils
.
objectattributes
.
attributable
.
AttributesImpl
;
26
27
final
class
VehicleImpl
implements
Vehicle {
28
29
private
VehicleType type;
30
private
Id<Vehicle> id;
31
private
Attributes attributes;
32
33
VehicleImpl(Id<Vehicle>
id
, VehicleType type) {
34
Gbl.assertNotNull(
id
);
35
Gbl.assertNotNull(type);
36
this.
id
= id;
37
this.type = type;
38
this.attributes =
new
AttributesImpl();
39
}
40
41
@Override
42
public
Id<Vehicle> getId() {
43
return
id;
44
}
45
46
@Override
47
public
VehicleType getType() {
48
return
this.type;
49
}
50
51
@Override
52
public
String toString() {
53
return
"[ID="
+
id
+
" | type="
+ type.toString() +
"]"
;
54
}
55
56
57
@Override
58
public
Attributes getAttributes() {
59
return
this.attributes;
60
}
61
}
org.matsim.api.core.v01.Id
Definition:
Id.java:44
org
org.matsim.utils
org.matsim.utils.objectattributes
org.matsim.api
org.matsim.core
org.matsim.core.gbl
Definition:
Gbl.java:21
org.matsim.utils.objectattributes.attributable
Definition:
Attributable.java:22
org.matsim.api.core
org.matsim.utils.objectattributes.attributable.Attributes
Definition:
Attributes.java:29
org.matsim.utils.objectattributes.attributable.AttributesImpl
Definition:
AttributesImpl.java:31
org.matsim
org.matsim.core.gbl.Gbl
Definition:
Gbl.java:38
org.matsim.api.core.v01
Definition:
BasicLocation.java:20
Generated by
1.8.13