Interface ICommandManager

All Known Implementing Classes:
CommandManager

public interface ICommandManager
Invoker of commands in the command pattern.
  • Method Details

    • addCommand

      void addCommand​(AbstractCommand command)
      Adds the given AbstractCommand to the stack and executes it.
      Parameters:
      command - Command to execute.
    • undoCommand

      void undoCommand()
      Undo's the last committed command.
    • redoCommand

      void redoCommand()
      Redo's the last committed command.
    • canUndo

      boolean canUndo()
      Returns true if undoCommand() can be called.
      Returns:
      Returns true if undoCommand() can be called.
    • canRedo

      boolean canRedo()
      Returns true if redoCommand() ()} can be called.
      Returns:
      Returns true if redoCommand() ()} can be called.