source: josm/trunk/src/org/openstreetmap/josm/data/osm/NodeData.java@ 3083

Last change on this file since 3083 was 3083, checked in by bastiK, 14 years ago

added svn:eol-style=native to source files

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain
File size: 1.3 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm;
3
4import org.openstreetmap.josm.data.coor.CachedLatLon;
5import org.openstreetmap.josm.data.coor.EastNorth;
6import org.openstreetmap.josm.data.coor.LatLon;
7
8public class NodeData extends PrimitiveData {
9
10 private final CachedLatLon coor = new CachedLatLon(0, 0);
11
12 public NodeData() {
13
14 }
15
16 public NodeData(double lat, double lon, String... keys) {
17 setCoor(new LatLon(lat, lon));
18 setKeysAsList(keys);
19 }
20
21 public NodeData(String... keys) {
22 setKeysAsList(keys);
23 }
24
25 public NodeData(NodeData data) {
26 super(data);
27 setCoor(data.getCoor());
28 }
29
30 public LatLon getCoor() {
31 return coor;
32 }
33
34 public void setCoor(LatLon coor) {
35 this.coor.setCoor(coor);
36 }
37
38 public EastNorth getEastNorth() {
39 return this.coor.getEastNorth();
40 }
41
42 public void setEastNorth(EastNorth eastNorth) {
43 this.coor.setEastNorth(eastNorth);
44 }
45
46 @Override
47 public NodeData makeCopy() {
48 return new NodeData(this);
49 }
50
51 @Override
52 public String toString() {
53 return super.toString() + " NODE " + coor;
54 }
55
56 @Override
57 public OsmPrimitiveType getType() {
58 return OsmPrimitiveType.NODE;
59 }
60}
Note: See TracBrowser for help on using the repository browser.