001package myhw3.command; 002 003/** 004 * An UndoableCommand may be run at most once. 005 */ 006public interface Command { 007 /** 008 * Do the command. 009 * @return true if command succeeds, false otherwise 010 */ 011 public boolean run (); 012 /** 013 * Undo the command. 014 */ 015 public void undo (); 016 /** 017 * Redo the command. 018 */ 019 public void redo (); 020}