package atmsdriver.trafficeventseditor; import atmsdriver.model.LoopDetector; import atmsdriver.model.LoopDetector.DOTCOLOR; import atmsdriver.model.Station; /** * * @author jtorres */ final public class TrafficLaneEvent implements Comparable { final public Integer routeNum; final public Station station; final public LoopDetector loopDetector; final public DOTCOLOR color; public TrafficLaneEvent(Integer routeNum, Station stn, LoopDetector loopDetector, DOTCOLOR color) { this.routeNum = routeNum; this.station = stn; this.loopDetector = loopDetector; this.color = color; } @Override public int compareTo(Object o) { if(!(o instanceof TrafficLaneEvent)) { return -1; } TrafficLaneEvent other = (TrafficLaneEvent) o; if(other.station == this.station && other.routeNum == this.routeNum && other.loopDetector == this.loopDetector) { return 0; } else { return -1; } } }