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 @Override
68 public int hashCode()
69 {
70 final int prime = 31;
71 int result = 1;
72 result = prime * result + ((this.routeName == null) ? 0 : this.routeName.hashCode());
73 return result;
74 }
75
76 @Override
77 public boolean equals(final Object obj)
78 {
79 if (this == obj)
80 return true;
81 if (obj == null)
82 return false;
83 if (getClass() != obj.getClass())
84 return false;
85 RouteData other = (RouteData) obj;
86 if (this.routeName == null)
87 {
88 if (other.routeName != null)
89 return false;
90 }
91 else if (!this.routeName.equals(other.routeName))
92 return false;
93 return true;
94 }
95
96 @Override
97 public String toString()
98 {
99 return "RouteData [routeName=" + this.routeName + ", startNode=" + this.startNode + ", endNode=" + this.endNode + "]";
100 }
101
102 }