001 // License: GPL. For details, see LICENSE file.
002 package org.openstreetmap.josm.corrector;
003
004 /**
005 * TagCorrection reprepresents a change of a single
006 * tag. Both key and value can be subject of this change.
007 */
008 public class TagCorrection implements Correction {
009
010 public final String oldKey;
011 public final String newKey;
012 public final String oldValue;
013 public final String newValue;
014
015 public TagCorrection(String oldKey, String oldValue, String newKey,
016 String newValue) {
017 this.oldKey = oldKey;
018 this.oldValue = oldValue;
019 this.newKey = newKey;
020 this.newValue = newValue;
021 }
022
023 public boolean isKeyChanged() {
024 return !newKey.equals(oldKey);
025 }
026
027 public boolean isValueChanged() {
028 return !newValue.equals(oldValue);
029 }
030 }