Line | |
---|
1 | package nanolog;
|
---|
2 |
|
---|
3 | import java.awt.*;
|
---|
4 | import java.util.*;
|
---|
5 | import org.openstreetmap.josm.Main;
|
---|
6 | import org.openstreetmap.josm.data.Bounds;
|
---|
7 | import org.openstreetmap.josm.data.coor.LatLon;
|
---|
8 | import org.openstreetmap.josm.gui.MapView;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * This holds one NanoLog entry.
|
---|
12 | *
|
---|
13 | * @author zverik
|
---|
14 | */
|
---|
15 | public class NanoLogEntry implements Comparable<NanoLogEntry> {
|
---|
16 | private LatLon pos;
|
---|
17 | private Date time;
|
---|
18 | private String message;
|
---|
19 | private Integer direction;
|
---|
20 | private Integer baseDir;
|
---|
21 | private LatLon basePos;
|
---|
22 |
|
---|
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() {
|
---|
38 | return direction;
|
---|
39 | }
|
---|
40 |
|
---|
41 | public String getMessage() {
|
---|
42 | return message;
|
---|
43 | }
|
---|
44 |
|
---|
45 | public LatLon getPos() {
|
---|
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;
|
---|
63 | }
|
---|
64 |
|
---|
65 | public Date getTime() {
|
---|
66 | return time;
|
---|
67 | }
|
---|
68 |
|
---|
69 | @Override
|
---|
70 | public int compareTo( NanoLogEntry t ) {
|
---|
71 | return time.compareTo(t.time);
|
---|
72 | }
|
---|
73 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.