A node is a command and has an execute method. Subclasses of Node are supposed to override the execute method to implement some specific behaviour for that node type.

 
  • 节点使用了命令模式,只有一个方法。一个节点是一个命令,有一个执行方法。节点的子类支持覆盖这个执行方法,根据节点的类型实现不同的方法。
今日热词
目录 附录 查词历史