src/main/java/chalmers/pimp/model/command/CommandManager.java
public void insertCommand(ICommand command) {
    Objects.requireNonNull(command);
    ensureSize(undoDeque);
    undoDeque.push(command);
    redoDeque.clear();

    notifyUndoRedoListeners();
  }
/**
   * Adds the supplied command to the command manager. Invoking this method clears the redo stack.
   *
   * @param command the command that will be added.
   * @throws NullPointerException if any arguments are {@code null}.
   */
Adds the supplied command to the command manager. Invoking this method clears the redo stack.
@param command the command that will be added.
@throws NullPointerException if any arguments are  null.
Adds the supplied command to the command manager . Invoking this method clears the redo stack . @param command the command that will be added . @throws NullPointerException if any arguments are null .
public void insertCommand(ICommand command) {
    Objects.requireNonNull(command);
    ensureSize(undoDeque);
    undoDeque.push(command);
    redoDeque.clear();
    notifyUndoRedoListeners();
  }
public void insertCommand ( ICommand command ) { Objects . requireNonNull ( command ) ; ensureSize ( undoDeque ) ; undoDeque . push ( command ) ; redoDeque . clear ( ) ; notifyUndoRedoListeners ( ) ; }
Adds the supplied command to the command manager.
Adds the supplied command to the command manager .