Class StreetsideCommand
- java.lang.Object
-
- org.openstreetmap.josm.plugins.streetside.history.commands.StreetsideCommand
-
- Direct Known Subclasses:
CommandMove,CommandTurn,StreetsideExecutableCommand
public abstract class StreetsideCommand extends java.lang.Object
Abstract class for any Streetside command.
-
-
Field Summary
Fields Modifier and Type Field Description java.util.Set<StreetsideAbstractImage>imagesSet ofStreetsideAbstractImageobjects affected by the command
-
Constructor Summary
Constructors Constructor Description StreetsideCommand(java.util.Set<StreetsideAbstractImage> images)Main constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract voidredo()Redoes the action.abstract voidsum(StreetsideCommand command)If two equal commands are applied consecutively to the same set of images, they are summed in order to reduce them to just one command.abstract java.lang.StringtoString()abstract voidundo()Undoes the action.
-
-
-
Field Detail
-
images
public java.util.Set<StreetsideAbstractImage> images
Set ofStreetsideAbstractImageobjects affected by the command
-
-
Constructor Detail
-
StreetsideCommand
public StreetsideCommand(java.util.Set<StreetsideAbstractImage> images)
Main constructor.- Parameters:
images- The images that are affected by the command.
-
-
Method Detail
-
undo
public abstract void undo()
Undoes the action.
-
redo
public abstract void redo()
Redoes the action.
-
sum
public abstract void sum(StreetsideCommand command)
If two equal commands are applied consecutively to the same set of images, they are summed in order to reduce them to just one command.- Parameters:
command- The command to be summed to last command.
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-