Command Example (3/6)
import java.util.*;
class CommandManager {
private int maxHistorySize = 100;
private LinkedList historyList = new LinkedList();
private LinkedList redoList = new LinkedList();
public void invokeCommand(AbstractCommand command) {
if (command.doIt()) {
addToHistory(command);
} else {
historyList.clear();
}
}
Previous slide
Next slide
Back to first slide
View graphic version