public class ChangePropertyKeyCommand extends Command
Command.OldNodeState
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
key
The key that is subject to change.
|
private java.lang.String |
newKey
The mew key.
|
private java.util.List<? extends OsmPrimitive> |
objects
All primitives, that are affected with this command.
|
Constructor and Description |
---|
ChangePropertyKeyCommand(java.util.Collection<? extends OsmPrimitive> objects,
java.lang.String key,
java.lang.String newKey)
Constructs a new
ChangePropertyKeyCommand . |
ChangePropertyKeyCommand(OsmPrimitive object,
java.lang.String key,
java.lang.String newKey)
Constructs a new
ChangePropertyKeyCommand . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
boolean |
executeCommand()
Executes the command on the dataset.
|
void |
fillModifiedData(java.util.Collection<OsmPrimitive> modified,
java.util.Collection<OsmPrimitive> deleted,
java.util.Collection<OsmPrimitive> added)
Fill in the changed data this command operates on.
|
java.util.Collection<PseudoCommand> |
getChildren()
Returns the subcommands of this command.
|
javax.swing.Icon |
getDescriptionIcon()
Provides a descriptive icon of this command.
|
java.lang.String |
getDescriptionText()
Provides a description text representing this command.
|
int |
hashCode() |
checkAndConfirmOutlyingOperation, getLayer, getOrig, getParticipatingPrimitives, invalidBecauselayerRemoved, undoCommand
private final java.util.List<? extends OsmPrimitive> objects
private final java.lang.String key
private final java.lang.String newKey
public ChangePropertyKeyCommand(OsmPrimitive object, java.lang.String key, java.lang.String newKey)
ChangePropertyKeyCommand
.object
- the object subject to change replacementkey
- The key to replacenewKey
- the new value of the keypublic ChangePropertyKeyCommand(java.util.Collection<? extends OsmPrimitive> objects, java.lang.String key, java.lang.String newKey)
ChangePropertyKeyCommand
.objects
- all objects subject to change replacementkey
- The key to replacenewKey
- the new value of the keypublic boolean executeCommand()
Command
executeCommand
in class Command
public void fillModifiedData(java.util.Collection<OsmPrimitive> modified, java.util.Collection<OsmPrimitive> deleted, java.util.Collection<OsmPrimitive> added)
Command
fillModifiedData
in class Command
modified
- The modified primitivesdeleted
- The deleted primitivesadded
- The added primitivespublic java.lang.String getDescriptionText()
PseudoCommand
getDescriptionText
in class PseudoCommand
public javax.swing.Icon getDescriptionIcon()
PseudoCommand
getDescriptionIcon
in class PseudoCommand
public java.util.Collection<PseudoCommand> getChildren()
PseudoCommand
getChildren
in class PseudoCommand