public abstract class AbstractCompoundCommand extends AbstractCommand
ICommand interface.| Modifier and Type | Method and Description |
|---|---|
void |
append(ICommand command)
Append specified command to this compound command's list of commands.
|
java.util.List<ICommand> |
getContainedCommands()
Return an unmodifiable view of contained commands.
|
int |
getContainedCommandsSize()
Return the number of contained commands in this compound one.
|
void |
insert(int index,
ICommand command)
Insert specified command at the specified index in this compound command's list of commands.
|
boolean |
isReadOnly()
Is the command only reading model objects or is it modifying any of them ?
|
void |
prepend(ICommand command)
Prepend specified command to this compound command's list of commands.
|
void |
run() |
commandInterrupted, commandRolledBack, getAffectedObjects, getExecutionOptions, getName, isInterrupted, isRolledBack, toStringpublic void append(ICommand command)
command - the added command.public void prepend(ICommand command)
command - the added command.public void insert(int index,
ICommand command)
index - index at which the specified command is to be inserted.command - java.lang.IndexOutOfBoundsException - if the index is out of range (index < 0 || index > size()).public int getContainedCommandsSize()
public java.util.List<ICommand> getContainedCommands()
null list of ICommand.public boolean isReadOnly()
ICommandtrue if read only, false if any model object is modified by the command.ICommand.isReadOnly()public void run()
Runnable.run()