Changeset 204 in tmcsimulator for trunk/src/atmsdriver/model/TrafficEvent.java
- Timestamp:
- 10/31/2017 02:08:33 PM (9 years ago)
- File:
-
- 1 edited
-
trunk/src/atmsdriver/model/TrafficEvent.java (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/atmsdriver/model/TrafficEvent.java
r197 r204 6 6 import java.util.Date; 7 7 import java.util.Scanner; 8 8 9 9 10 /** … … 27 28 public final double range; 28 29 public final String rawString; 30 29 31 private final static SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss"); 30 32 … … 61 63 return rawString; 62 64 } 65 @Override 66 public boolean equals(Object other) 67 { 68 Boolean result = false; 69 if (other == null) return false; 70 if ( other instanceof TrafficEvent ) 71 { 72 TrafficEvent that = (TrafficEvent) other; 73 result = that.incident.equals(this.incident) 74 && that.eventTime.equals(this.eventTime) 75 && ((int) that.postmile) == ((int) this.postmile) 76 && that.dir == this.dir 77 && that.color == this.color; 78 } 79 return result; 80 } 63 81 }
Note: See TracChangeset
for help on using the changeset viewer.
