Package Behavioral.Command
Class Invoker
java.lang.Object
Behavioral.Command.Invoker
The Invoker class stores and executes commands.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCommand(Command command) Adds a command to the queue.voidExecutes all commands in the queue and clears it.
-
Constructor Details
-
Invoker
public Invoker()Default constructor for Invoker.
-
-
Method Details
-
addCommand
Adds a command to the queue.- Parameters:
command- The Command to add.
-
executeAll
public void executeAll()Executes all commands in the queue and clears it.
-