the structure of command pattern:
命令模式完成的事情:
the command pattern is a behavioral design pattern in which an object is used to represent and encapsulate all the information needed to call a method at a later time. This information includes the method name, the object that owns the method and values for the method parameters.
命令模式是一种行为设计模式。在这种模式中:1)在后面的某个时间调用一个方法method;2)有一个对象封装和呈现出调用的方法method的所有信息,包括方法名字,方法所属的对象,以及该方法需要的参数;
来自:
http://en.wikipedia.org/wiki/Command_pattern