1 package org.opentrafficsim.road.network.lane;
2
3 import java.io.Serializable;
4
5 import org.opentrafficsim.core.gtu.GTUDirectionality;
6
7
8
9
10
11
12
13
14
15
16
17 public class LaneDirection implements Serializable
18 {
19
20 private static final long serialVersionUID = 20160330L;
21
22
23 private final Lane lane;
24
25
26 private final GTUDirectionality direction;
27
28
29
30
31
32 public LaneDirection(final Lane lane, final GTUDirectionality direction)
33 {
34 super();
35 this.lane = lane;
36 this.direction = direction;
37 }
38
39
40
41
42 public final Lane getLane()
43 {
44 return this.lane;
45 }
46
47
48
49
50 public final GTUDirectionality getDirection()
51 {
52 return this.direction;
53 }
54
55
56 @Override
57 public String toString()
58 {
59 return "[" + this.lane + (this.direction.isPlus() ? " +]" : " -]");
60 }
61
62 }