source: josm/trunk/src/org/openstreetmap/josm/data/conflict/PositionConflict.java@ 1169

Last change on this file since 1169 was 1169, checked in by stoecker, 15 years ago

removed usage of tab stops

  • Property svn:eol-style set to native
File size: 975 bytes
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.data.conflict;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5
6import org.openstreetmap.josm.data.osm.Node;
7import org.openstreetmap.josm.data.osm.OsmPrimitive;
8
9public class PositionConflict extends ConflictItem {
10
11 @Override public boolean hasConflict(OsmPrimitive key, OsmPrimitive value) {
12 return key instanceof Node && !((Node)key).coor.equals(((Node)value).coor);
13 }
14
15 @Override protected String str(OsmPrimitive osm) {
16 return osm instanceof Node ? ((Node)osm).coor.lat()+", "+((Node)osm).coor.lon() : null;
17 }
18
19 @Override public String key() {
20 return "node|"+tr("position");
21 }
22
23 @Override public void apply(OsmPrimitive target, OsmPrimitive other) {
24 if (target instanceof Node) {
25 ((Node)target).coor = ((Node)other).coor;
26 ((Node)target).eastNorth = ((Node)other).eastNorth;
27 }
28 }
29}
Note: See TracBrowser for help on using the repository browser.