source: josm/src/org/openstreetmap/josm/data/osm/visitor/DeleteVisitor.java@ 71

Last change on this file since 71 was 71, checked in by imi, 18 years ago
  • refactored GpsPoint to be immutable and added LatLon and NorthEast
  • refactored Bounding Box calculations
  • various other renames
File size: 704 bytes
Line 
1/**
2 */
3package org.openstreetmap.josm.data.osm.visitor;
4
5import org.openstreetmap.josm.data.osm.DataSet;
6import org.openstreetmap.josm.data.osm.LineSegment;
7import org.openstreetmap.josm.data.osm.Node;
8import 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 */
17public class DeleteVisitor implements Visitor {
18
19 private final DataSet ds;
20
21 public DeleteVisitor(DataSet ds) {
22 this.ds = ds;
23 }
24
25 public void visit(Node n) {
26 ds.nodes.remove(n);
27 }
28 public void visit(LineSegment ls) {
29 ds.lineSegments.remove(ls);
30 }
31 public void visit(Way t) {
32 ds.ways.remove(t);
33 }
34}
Note: See TracBrowser for help on using the repository browser.