source:
osm/applications/editors/josm/plugins/NanoLog/src/nanolog/NanoLogEntry.java
| Last change on this file was 36483, checked in by , 4 months ago | |
|---|---|
|
|
| File size: 1.4 KB | |
| Rev | Line | |
|---|---|---|
| [27939] | 1 | package nanolog; |
| 2 | ||
| [30701] | 3 | import java.util.Date; |
| 4 | ||
| [27939] | 5 | import org.openstreetmap.josm.data.coor.LatLon; |
| 6 | ||
| 7 | /** | |
| 8 | * This holds one NanoLog entry. | |
| [32638] | 9 | * |
| [27939] | 10 | * @author zverik |
| 11 | */ | |
| [30491] | 12 | public class NanoLogEntry implements Comparable<NanoLogEntry> { |
| [27939] | 13 | private LatLon pos; |
| 14 | private Date time; | |
| 15 | private String message; | |
| [30491] | 16 | private Integer direction; |
| 17 | private Integer baseDir; | |
| 18 | private LatLon basePos; | |
| [27939] | 19 | |
| [32638] | 20 | public NanoLogEntry(Date time, String message, LatLon basePos, Integer baseDir) { |
| [30491] | 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 | ||
| [32638] | 29 | public NanoLogEntry(Date time, String message) { |
| [30491] | 30 | this(time, message, null, null); |
| 31 | } | |
| [32638] | 32 | |
| [30491] | 33 | public Integer getDirection() { |
| [27939] | 34 | return direction; |
| 35 | } | |
| 36 | ||
| 37 | public String getMessage() { | |
| 38 | return message; | |
| 39 | } | |
| 40 | ||
| 41 | public LatLon getPos() { | |
| [30491] | 42 | return pos; |
| [27939] | 43 | } |
| 44 | ||
| [32638] | 45 | public void setPos(LatLon pos) { |
| [30491] | 46 | this.pos = pos; |
| 47 | } | |
| 48 | ||
| [32638] | 49 | public void setDirection(Integer direction) { |
| [30491] | 50 | this.direction = direction; |
| 51 | } | |
| 52 | ||
| 53 | public LatLon getBasePos() { | |
| 54 | return basePos; | |
| 55 | } | |
| 56 | ||
| 57 | public Integer getBaseDir() { | |
| 58 | return baseDir; | |
| 59 | } | |
| 60 | ||
| [27939] | 61 | public Date getTime() { |
| 62 | return time; | |
| 63 | } | |
| [30491] | 64 | |
| 65 | @Override | |
| [32638] | 66 | public int compareTo(NanoLogEntry t) { |
| [30491] | 67 | return time.compareTo(t.time); |
| 68 | } | |
| [27939] | 69 | } |
Note:
See TracBrowser
for help on using the repository browser.
