|
Last change
on this file since 86 was 86, checked in by imi, 20 years ago |
- added conflicts and resolve conflict dialog
This is one of those "changed everything" checkpoint.
|
|
File size:
756 bytes
|
| Line | |
|---|
| 1 | /**
|
|---|
| 2 | *
|
|---|
| 3 | */
|
|---|
| 4 | package org.openstreetmap.josm.data.conflict;
|
|---|
| 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|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.