Class Invoker

java.lang.Object
Behavioral.Command.Invoker

public class Invoker extends Object
The Invoker class stores and executes commands.
  • Constructor Details

    • Invoker

      public Invoker()
      Default constructor for Invoker.
  • Method Details

    • addCommand

      public void addCommand(Command command)
      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.