source: josm/trunk/src/org/openstreetmap/josm/data/osm/WayData.java@ 2405

Last change on this file since 2405 was 2405, checked in by jttt, 14 years ago

Save reference to dataset in OsmPrimitive

  • Property svn:mime-type set to text/plain
File size: 732 bytes
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.data.osm;
3
4import java.util.ArrayList;
5import java.util.List;
6
7public class WayData extends PrimitiveData {
8
9 private final List<Long> nodes = new ArrayList<Long>();
10
11 public WayData() {
12
13 }
14
15 public WayData(WayData data) {
16 super(data);
17 nodes.addAll(data.getNodes());
18 }
19
20 public List<Long> getNodes() {
21 return nodes;
22 }
23
24 @Override
25 public WayData makeCopy() {
26 return new WayData(this);
27 }
28
29 @Override
30 public String toString() {
31 return super.toString() + " WAY" + nodes.toString();
32 }
33
34 public OsmPrimitiveType getType() {
35 return OsmPrimitiveType.WAY;
36 }
37
38}
Note: See TracBrowser for help on using the repository browser.