Last change
on this file since 298 was 298, checked in by imi, 17 years ago |
- added license description to head of each source file
|
File size:
865 bytes
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.conflict;
|
---|
3 |
|
---|
4 | import static org.openstreetmap.josm.tools.I18n.tr;
|
---|
5 |
|
---|
6 | import org.openstreetmap.josm.data.osm.OsmPrimitive;
|
---|
7 | import org.openstreetmap.josm.data.osm.Segment;
|
---|
8 |
|
---|
9 | public class ToConflict extends ConflictItem {
|
---|
10 |
|
---|
11 | @Override public boolean hasConflict(OsmPrimitive key, OsmPrimitive value) {
|
---|
12 | return key instanceof Segment && !((Segment)key).to.equals(((Segment)value).to);
|
---|
13 | }
|
---|
14 |
|
---|
15 | @Override protected String str(OsmPrimitive osm) {
|
---|
16 | return osm instanceof Segment ? String.valueOf(((Segment)osm).to.id) : null;
|
---|
17 | }
|
---|
18 |
|
---|
19 | @Override public String key() {
|
---|
20 | return "segment|"+tr("to");
|
---|
21 | }
|
---|
22 |
|
---|
23 | @Override public void apply(OsmPrimitive target, OsmPrimitive other) {
|
---|
24 | if (target instanceof Segment)
|
---|
25 | ((Segment)target).to = ((Segment)other).to;
|
---|
26 | }
|
---|
27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.