public class ChangePropertyCommand extends Command
Command.OldNodeState| Modifier and Type | Field and Description |
|---|---|
private List<OsmPrimitive> |
objects
All primitives that are affected with this command.
|
private Map<String,String> |
tags
Key and value pairs.
|
| Constructor and Description |
|---|
ChangePropertyCommand(Collection<? extends OsmPrimitive> objects,
Map<String,String> tags)
Creates a command to change multiple tags of multiple objects
|
ChangePropertyCommand(Collection<? extends OsmPrimitive> objects,
String key,
String value)
Creates a command to change one tag of multiple objects
|
ChangePropertyCommand(OsmPrimitive object,
String key,
String value)
Creates a command to change one tag of one object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
boolean |
executeCommand()
Executes the command on the dataset.
|
void |
fillModifiedData(Collection<OsmPrimitive> modified,
Collection<OsmPrimitive> deleted,
Collection<OsmPrimitive> added)
Fill in the changed data this command operates on.
|
Collection<PseudoCommand> |
getChildren()
Returns the subcommands of this command.
|
Icon |
getDescriptionIcon()
Provides a descriptive icon of this command.
|
String |
getDescriptionText()
Provides a description text representing this command.
|
int |
getObjectsNumber()
Returns the number of objects that will effectively be modified, before the command is executed.
|
Map<String,String> |
getTags()
Returns the tags to set (key/value pairs).
|
int |
hashCode() |
private void |
init(Collection<? extends OsmPrimitive> objects)
Initialize the instance by finding what objects will be modified
|
checkAndConfirmOutlyingOperation, getLayer, getOrig, getParticipatingPrimitives, invalidBecauselayerRemoved, undoCommandprivate final List<OsmPrimitive> objects
public ChangePropertyCommand(Collection<? extends OsmPrimitive> objects, Map<String,String> tags)
objects - the objects to modifytags - the tags to setpublic ChangePropertyCommand(Collection<? extends OsmPrimitive> objects, String key, String value)
objects - the objects to modifykey - the key of the tag to setvalue - the value of the key to setpublic ChangePropertyCommand(OsmPrimitive object, String key, String value)
object - the object to modifykey - the key of the tag to setvalue - the value of the key to setprivate void init(Collection<? extends OsmPrimitive> objects)
objects - the objects to (possibly) modifypublic boolean executeCommand()
CommandexecuteCommand in class Commandpublic void fillModifiedData(Collection<OsmPrimitive> modified, Collection<OsmPrimitive> deleted, Collection<OsmPrimitive> added)
CommandfillModifiedData in class Commandmodified - The modified primitivesdeleted - The deleted primitivesadded - The added primitivespublic String getDescriptionText()
PseudoCommandgetDescriptionText in class PseudoCommandpublic Icon getDescriptionIcon()
PseudoCommandgetDescriptionIcon in class PseudoCommandpublic Collection<PseudoCommand> getChildren()
PseudoCommandgetChildren in class PseudoCommandpublic final int getObjectsNumber()
Command.getParticipatingPrimitives()public Map<String,String> getTags()