Changeset 1169 in josm for trunk/src/org/openstreetmap/josm/data/osm/visitor/AddVisitor.java
- Timestamp:
- 2008-12-23T15:07:05+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/visitor/AddVisitor.java
r655 r1169 9 9 /** 10 10 * Visitor that adds the visited object to the dataset given at constructor. 11 * 11 * 12 12 * Is not capable of adding keys. 13 * 13 * 14 14 * @author imi 15 15 */ 16 16 public class AddVisitor implements Visitor { 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 17 18 protected final DataSet ds; 19 20 public AddVisitor(DataSet ds) { 21 this.ds = ds; 22 } 23 24 public void visit(Node n) { 25 ds.nodes.add(n); 26 } 27 public void visit(Way w) { 28 ds.ways.add(w); 29 } 30 public void visit(Relation e) { 31 ds.relations.add(e); 32 } 33 33 }
Note:
See TracChangeset
for help on using the changeset viewer.