sjm.imperative
Class CommandSequence
java.lang.Object
|
+--sjm.imperative.Command
|
+--sjm.imperative.CommandSequence
- public class CommandSequence
- extends Command
This class contains a sequence of other commands.
|
Field Summary |
protected java.util.Vector |
commands
|
|
Method Summary |
void |
addCommand(Command c)
Add a command to the sequence of commands to which this
object will cascade an execute command. |
protected java.util.Vector |
commands()
Lazy-initialize the commands vector. |
void |
execute()
Ask each command in the sequence to execute. |
java.lang.String |
toString()
Returns a string description of this command sequence. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
commands
protected java.util.Vector commands
CommandSequence
public CommandSequence()
addCommand
public void addCommand(Command c)
- Add a command to the sequence of commands to which this
object will cascade an
execute command.
- Parameters:
Command - a command to add to this command sequence
commands
protected java.util.Vector commands()
- Lazy-initialize the
commands vector.
execute
public void execute()
- Ask each command in the sequence to
execute.
- Overrides:
- execute in class Command
toString
public java.lang.String toString()
- Returns a string description of this command sequence.
- Overrides:
- toString in class java.lang.Object
- Returns:
- a string description of this command sequence