Interface ICommandExecutor<M>

  • Type Parameters:
    M - the type of the model. Instances of this type encapsulate access to the model.
    All Known Implementing Classes:
    CachingPCMModelCommandExecutor, CountingPCMModelCommandExecutor, PCMModelCommandExecutor

    public interface ICommandExecutor<M>
    Classes implementing this interface provide the execution of ICommands operating on a certain model type M. Executing a command means to invoke the command's execute() method and pass the model instance on which the command operates.
    • Method Detail

      • execute

        <T> T execute​(ICommand<T,​M> command)
        Executes the specified command.
        Parameters:
        command - the command that is to be executed
        Returns:
        the result of executing the specified command, or null if the return type (T) is Void.