| Rev | Line | |
|---|
| 1 | package atmsdriver.trafficeventseditor; |
|---|
| 2 | |
|---|
| 3 | import atmsdriver.model.LoopDetector; |
|---|
| 4 | import atmsdriver.model.LoopDetector.DOTCOLOR; |
|---|
| 5 | import atmsdriver.model.Station; |
|---|
| 6 | |
|---|
| 7 | /** |
|---|
| 8 | * |
|---|
| 9 | * @author jtorres |
|---|
| 10 | */ |
|---|
| 11 | final public class TrafficLaneEvent implements Comparable |
|---|
| 12 | { |
|---|
| 13 | final public Integer routeNum; |
|---|
| 14 | final public Station station; |
|---|
| 15 | final public LoopDetector loopDetector; |
|---|
| 16 | final public DOTCOLOR color; |
|---|
| 17 | |
|---|
| 18 | public TrafficLaneEvent(Integer routeNum, Station stn, LoopDetector loopDetector, |
|---|
| 19 | DOTCOLOR color) |
|---|
| 20 | { |
|---|
| 21 | this.routeNum = routeNum; |
|---|
| 22 | this.station = stn; |
|---|
| 23 | this.loopDetector = loopDetector; |
|---|
| 24 | this.color = color; |
|---|
| 25 | } |
|---|
| 26 | |
|---|
| 27 | @Override |
|---|
| 28 | public int compareTo(Object o) |
|---|
| 29 | { |
|---|
| 30 | if(!(o instanceof TrafficLaneEvent)) |
|---|
| 31 | { |
|---|
| 32 | return -1; |
|---|
| 33 | } |
|---|
| 34 | TrafficLaneEvent other = (TrafficLaneEvent) o; |
|---|
| 35 | if(other.station == this.station && other.routeNum == this.routeNum |
|---|
| 36 | && other.loopDetector == this.loopDetector) |
|---|
| 37 | { |
|---|
| 38 | return 0; |
|---|
| 39 | } |
|---|
| 40 | else |
|---|
| 41 | { |
|---|
| 42 | return -1; |
|---|
| 43 | } |
|---|
| 44 | } |
|---|
| 45 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.