Changeset 10125 in josm for trunk/src/org/openstreetmap/josm/data/correction
- Timestamp:
- 2016-04-09T17:07:54+02:00 (8 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/data/correction
- Files:
-
- 2 added
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/correction/Correction.java
r10113 r10125 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. corrector;2 package org.openstreetmap.josm.data.correction; 3 3 4 /** 5 * Data correction. Represents any change. 6 * @since 1001 7 */ 4 8 public interface Correction { 5 9 -
trunk/src/org/openstreetmap/josm/data/correction/RoleCorrection.java
r10113 r10125 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. corrector;2 package org.openstreetmap.josm.data.correction; 3 3 4 4 import org.openstreetmap.josm.data.osm.Relation; 5 5 import org.openstreetmap.josm.data.osm.RelationMember; 6 6 7 /** 8 * Represents a change of a single {@link RelationMember} role. 9 * @since 1001 10 */ 7 11 public class RoleCorrection implements Correction { 8 12 13 /** OSM relation */ 9 14 public final Relation relation; 15 /** Relation member index */ 10 16 public final int position; 17 /** Relation member */ 11 18 public final RelationMember member; 19 /** New role */ 12 20 public final String newRole; 13 21 14 public RoleCorrection(Relation relation, int position, 15 RelationMember member, String newRole) { 22 /** 23 * Constructs a new {@code RoleCorrection}. 24 * @param relation OSM relation 25 * @param position relation member index 26 * @param member relation member 27 * @param newRole new role 28 */ 29 public RoleCorrection(Relation relation, int position, RelationMember member, String newRole) { 16 30 this.relation = relation; 17 31 this.position = position; -
trunk/src/org/openstreetmap/josm/data/correction/TagCorrection.java
r10113 r10125 1 1 // License: GPL. For details, see LICENSE file. 2 package org.openstreetmap.josm. corrector;2 package org.openstreetmap.josm.data.correction; 3 3 4 4 /** 5 * TagCorrection reprepresents a change of a single 6 * tag. Both key and value can be subject of this change. 5 * Represents a change of a single tag. 6 * Both key and value can be subject of this change. 7 * @since 729 7 8 */ 8 9 public class TagCorrection implements Correction { 9 10 11 /** Old key */ 10 12 public final String oldKey; 13 /** New key */ 11 14 public final String newKey; 15 /** Old value */ 12 16 public final String oldValue; 17 /** New value */ 13 18 public final String newValue; 14 19 15 public TagCorrection(String oldKey, String oldValue, String newKey, 16 String newValue) { 20 /** 21 * Constructs a new {@code TagCorrection}. 22 * @param oldKey old key 23 * @param oldValue old value 24 * @param newKey new key 25 * @param newValue new value 26 */ 27 public TagCorrection(String oldKey, String oldValue, String newKey, String newValue) { 17 28 this.oldKey = oldKey; 18 29 this.oldValue = oldValue; … … 21 32 } 22 33 34 /** 35 * Determines if the key has changed. 36 * @return {@code true} if the key has changed 37 */ 23 38 public boolean isKeyChanged() { 24 39 return !newKey.equals(oldKey); 25 40 } 26 41 42 /** 43 * Determines if the value has changed. 44 * @return {@code true} if the value has changed 45 */ 27 46 public boolean isValueChanged() { 28 47 return !newValue.equals(oldValue);
Note:
See TracChangeset
for help on using the changeset viewer.