public class CommandUnjoin extends StreetsideExecutableCommand
| Modifier and Type | Field and Description |
|---|---|
private StreetsideAbstractImage |
a |
private StreetsideAbstractImage |
b |
images| Constructor and Description |
|---|
CommandUnjoin(List<StreetsideAbstractImage> images)
Main constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes the command.
|
void |
redo()
Redoes the action.
|
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.
|
String |
toString() |
void |
undo()
Undoes the action.
|
private final StreetsideAbstractImage a
private final StreetsideAbstractImage b
public CommandUnjoin(List<StreetsideAbstractImage> images)
images - The two images that are going to be unjoined. Must be of exactly
size 2.IllegalArgumentException - if the List size is different from 2.public void execute()
StreetsideExecutableCommandexecute in class StreetsideExecutableCommandpublic void undo()
StreetsideCommandundo in class StreetsideCommandpublic void redo()
StreetsideCommandredo in class StreetsideCommandpublic void sum(StreetsideCommand command)
StreetsideCommandsum in class StreetsideCommandcommand - The command to be summed to last command.public String toString()
toString in class StreetsideCommand