source: osm/applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java@ 31981

Last change on this file since 31981 was 31981, checked in by donvip, 9 years ago

[josm_nanolog] update to JOSM 9383 + fix Eclipse warnings + fix NPE if nanolog layer is created first

File size: 1.4 KB
Line 
1package nanolog;
2
3import java.util.Date;
4
5import org.openstreetmap.josm.data.coor.LatLon;
6
7/**
8 * This holds one NanoLog entry.
9 *
10 * @author zverik
11 */
12public class NanoLogEntry implements Comparable<NanoLogEntry> {
13 private LatLon pos;
14 private Date time;
15 private String message;
16 private Integer direction;
17 private Integer baseDir;
18 private LatLon basePos;
19
20 public NanoLogEntry( Date time, String message, LatLon basePos, Integer baseDir ) {
21 this.basePos = basePos;
22 this.baseDir = baseDir;
23 this.pos = basePos;
24 this.direction = baseDir;
25 this.time = time;
26 this.message = message;
27 }
28
29 public NanoLogEntry( Date time, String message ) {
30 this(time, message, null, null);
31 }
32
33 public Integer getDirection() {
34 return direction;
35 }
36
37 public String getMessage() {
38 return message;
39 }
40
41 public LatLon getPos() {
42 return pos;
43 }
44
45 public void setPos( LatLon pos ) {
46 this.pos = pos;
47 }
48
49 public void setDirection( Integer direction ) {
50 this.direction = direction;
51 }
52
53 public LatLon getBasePos() {
54 return basePos;
55 }
56
57 public Integer getBaseDir() {
58 return baseDir;
59 }
60
61 public Date getTime() {
62 return time;
63 }
64
65 @Override
66 public int compareTo( NanoLogEntry t ) {
67 return time.compareTo(t.time);
68 }
69}
Note: See TracBrowser for help on using the repository browser.