1 package org.opentrafficsim.road.gtu.lane.perception.headway;
2
3 import java.util.Set;
4
5 import org.djunits.value.vdouble.scalar.Length;
6 import org.opentrafficsim.core.gtu.GTUException;
7 import org.opentrafficsim.road.gtu.lane.perception.RelativeLane;
8 import org.opentrafficsim.road.network.lane.object.BusStop;
9
10 import nl.tudelft.simulation.immutablecollections.ImmutableSet;
11
12
13
14
15
16
17
18
19
20
21
22 public class HeadwayBusStop extends AbstractHeadwayCopy
23 {
24
25
26 private static final long serialVersionUID = 20170127L;
27
28
29 private final RelativeLane relativeLane;
30
31
32 private final ImmutableSet<String> lines;
33
34
35 private final Set<String> conflictIds;
36
37
38
39
40
41
42
43
44 public HeadwayBusStop(final BusStop busStop, final Length distance, final RelativeLane relativeLane,
45 final Set<String> conflictIds) throws GTUException
46 {
47 super(ObjectType.BUSSTOP, busStop.getId(), distance);
48 this.relativeLane = relativeLane;
49 this.lines = busStop.getLines();
50 this.conflictIds = conflictIds;
51 }
52
53
54
55
56 public final RelativeLane getRelativeLane()
57 {
58 return this.relativeLane;
59 }
60
61
62
63
64 public final ImmutableSet<String> getLines()
65 {
66 return this.lines;
67 }
68
69
70
71
72 public final Set<String> getConflictIds()
73 {
74 return this.conflictIds;
75 }
76
77
78 @Override
79 public final String toString()
80 {
81 return "HeadwayBusStop [relativeLane=" + this.relativeLane + ", lines=" + this.lines + ", conflictIds="
82 + this.conflictIds + "]";
83 }
84
85 }