Last change
on this file since 64 was 64, checked in by imi, 18 years ago |
- renamed track to way
- refactored Key to be a simple String
- fixed PropertyDialog which displayed <different> for doubled values
|
File size:
690 bytes
|
Line | |
---|
1 | /**
|
---|
2 | */
|
---|
3 | package org.openstreetmap.josm.data.osm.visitor;
|
---|
4 |
|
---|
5 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
6 | import org.openstreetmap.josm.data.osm.LineSegment;
|
---|
7 | import org.openstreetmap.josm.data.osm.Node;
|
---|
8 | import org.openstreetmap.josm.data.osm.Way;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Visitor, that adds the visited object to the dataset given at constructor.
|
---|
12 | *
|
---|
13 | * Is not capable of adding keys.
|
---|
14 | *
|
---|
15 | * @author imi
|
---|
16 | */
|
---|
17 | public class AddVisitor implements Visitor {
|
---|
18 |
|
---|
19 | private final DataSet ds;
|
---|
20 |
|
---|
21 | public AddVisitor(DataSet ds) {
|
---|
22 | this.ds = ds;
|
---|
23 | }
|
---|
24 |
|
---|
25 | public void visit(Node n) {
|
---|
26 | ds.nodes.add(n);
|
---|
27 | }
|
---|
28 | public void visit(LineSegment ls) {
|
---|
29 | ds.lineSegments.add(ls);
|
---|
30 | }
|
---|
31 | public void visit(Way t) {
|
---|
32 | ds.waies.add(t);
|
---|
33 | }
|
---|
34 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.