Last change
on this file since 627 was 627, checked in by framm, 16 years ago |
|
-
Property svn:eol-style
set to
native
|
File size:
747 bytes
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.osm.visitor;
|
---|
3 |
|
---|
4 | import org.openstreetmap.josm.data.osm.DataSet;
|
---|
5 | import org.openstreetmap.josm.data.osm.Relation;
|
---|
6 | import org.openstreetmap.josm.data.osm.Node;
|
---|
7 | import org.openstreetmap.josm.data.osm.Way;
|
---|
8 |
|
---|
9 | /**
|
---|
10 | * Visitor, that adds the visited object to the dataset given at constructor.
|
---|
11 | *
|
---|
12 | * Is not capable of adding keys.
|
---|
13 | *
|
---|
14 | * @author imi
|
---|
15 | */
|
---|
16 | public class DeleteVisitor implements Visitor {
|
---|
17 |
|
---|
18 | private final DataSet ds;
|
---|
19 |
|
---|
20 | public DeleteVisitor(DataSet ds) {
|
---|
21 | this.ds = ds;
|
---|
22 | }
|
---|
23 |
|
---|
24 | public void visit(Node n) {
|
---|
25 | ds.nodes.remove(n);
|
---|
26 | }
|
---|
27 | public void visit(Way w) {
|
---|
28 | ds.ways.remove(w);
|
---|
29 | }
|
---|
30 | public void visit(Relation e) {
|
---|
31 | ds.relations.remove(e);
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.