[josm-dev] [PATCH 21/26] make-ChangePropertyCommand-take-single-object

Dave Hansen dave at sr71.net
Tue Apr 29 03:03:03 BST 2008



---

 core-dave/src/org/openstreetmap/josm/command/ChangePropertyCommand.java |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN src/org/openstreetmap/josm/command/ChangePropertyCommand.java~make-ChangePropertyCommand-take-single-object src/org/openstreetmap/josm/command/ChangePropertyCommand.java
--- core/src/org/openstreetmap/josm/command/ChangePropertyCommand.java~make-ChangePropertyCommand-take-single-object	2008-04-28 18:59:31.000000000 -0700
+++ core-dave/src/org/openstreetmap/josm/command/ChangePropertyCommand.java	2008-04-28 18:59:31.000000000 -0700
@@ -5,6 +5,7 @@ import static org.openstreetmap.josm.too
 import static org.openstreetmap.josm.tools.I18n.trn;
 
 import java.util.Collection;
+import java.util.Collections;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -43,6 +44,12 @@ public class ChangePropertyCommand exten
 		this.key = key;
 		this.value = value;
 	}
+
+	public ChangePropertyCommand(OsmPrimitive object, String key, String value) {
+		this.objects = new LinkedList<OsmPrimitive>(Collections.singleton(object));
+		this.key = key;
+		this.value = value;
+	}
 	
 	@Override public boolean executeCommand() {
 		super.executeCommand(); // save old
_




More information about the josm-dev mailing list