Changeset 30491 in osm for applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java
- Timestamp:
- 2014-06-10T00:04:18+02:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java
r27939 r30491 1 1 package nanolog; 2 2 3 import java.util.Date; 3 import java.awt.*; 4 import java.util.*; 5 import org.openstreetmap.josm.Main; 6 import org.openstreetmap.josm.data.Bounds; 4 7 import org.openstreetmap.josm.data.coor.LatLon; 8 import org.openstreetmap.josm.gui.MapView; 5 9 6 10 /** … … 9 13 * @author zverik 10 14 */ 11 public class NanoLogEntry { 15 public class NanoLogEntry implements Comparable<NanoLogEntry> { 12 16 private LatLon pos; 13 17 private Date time; 14 18 private String message; 15 private int direction; 16 private LatLon tmpPos; 19 private Integer direction; 20 private Integer baseDir; 21 private LatLon basePos; 17 22 18 public int getDirection() { 23 public NanoLogEntry( Date time, String message, LatLon basePos, Integer baseDir ) { 24 this.basePos = basePos; 25 this.baseDir = baseDir; 26 this.pos = basePos; 27 this.direction = baseDir; 28 this.time = time; 29 this.message = message; 30 this.direction = direction; 31 } 32 33 public NanoLogEntry( Date time, String message ) { 34 this(time, message, null, null); 35 } 36 37 public Integer getDirection() { 19 38 return direction; 20 39 } … … 25 44 26 45 public LatLon getPos() { 27 return tmpPos == null ? pos : tmpPos; 46 return pos; 47 } 48 49 public void setPos( LatLon pos ) { 50 this.pos = pos; 51 } 52 53 public void setDirection( Integer direction ) { 54 this.direction = direction; 55 } 56 57 public LatLon getBasePos() { 58 return basePos; 59 } 60 61 public Integer getBaseDir() { 62 return baseDir; 28 63 } 29 64 … … 31 66 return time; 32 67 } 68 69 @Override 70 public int compareTo( NanoLogEntry t ) { 71 return time.compareTo(t.time); 72 } 33 73 }
Note:
See TracChangeset
for help on using the changeset viewer.
