1 package org.opentrafficsim.sim0mq.kpi;
2
3
4
5
6
7
8
9
10
11
12 public class RouteData
13 {
14
15 private final String routeName;
16
17
18 private final String startNode;
19
20
21 private final String endNode;
22
23
24
25
26
27
28 public RouteData(final String routeName, final String startNode, final String endNode)
29 {
30 this.routeName = routeName;
31 this.startNode = startNode;
32 this.endNode = endNode;
33 }
34
35
36
37
38 public final String getRouteName()
39 {
40 return this.routeName;
41 }
42
43
44
45
46 public final String getStartNode()
47 {
48 return this.startNode;
49 }
50
51
52
53
54 public final String getEndNode()
55 {
56 return this.endNode;
57 }
58
59
60
61
62 public String getId()
63 {
64 return this.routeName;
65 }
66
67
68 @Override
69 public int hashCode()
70 {
71 final int prime = 31;
72 int result = 1;
73 result = prime * result + ((this.routeName == null) ? 0 : this.routeName.hashCode());
74 return result;
75 }
76
77
78 @Override
79 public boolean equals(final Object obj)
80 {
81 if (this == obj)
82 return true;
83 if (obj == null)
84 return false;
85 if (getClass() != obj.getClass())
86 return false;
87 RouteData other = (RouteData) obj;
88 if (this.routeName == null)
89 {
90 if (other.routeName != null)
91 return false;
92 }
93 else if (!this.routeName.equals(other.routeName))
94 return false;
95 return true;
96 }
97
98
99 @Override
100 public String toString()
101 {
102 return "RouteData [routeName=" + this.routeName + ", startNode=" + this.startNode + ", endNode=" + this.endNode + "]";
103 }
104
105 }