/**
 * A command executed by a view. Subclasses implement the hook method, clients
 * call execute which will call the hook method. Client code can assume every
 * command has an execute method, but the execute method calls the hook method
 * which does the real work.
 */
public abstract class ViewCommand
{
    public void execute (PuzzleView view)
    {
        hook(view, null);
    }

    public void execute (PuzzleView view, Object o)
    {
        hook(view, o);
    }

    protected abstract void hook (PuzzleView view, Object o);
}