Command Example (4/6)
public void undoCommand() {
if (historyList.size() > 0) {
AbstractCommand command = null;
command = (AbstractCommand) historyList.removeFirst();
redoList.addFirst(command);
public void redoCommand() {
if (redoList.size() > 0) {
AbstractCommand command = null;
command = (AbstractCommand) redoList.removeFirst();