Fork me on GitHub
摘要: 定义 状态模式(State Pattern)又称为状态对象模式,该模式允许一个对象在其内部状态改变的时候改变行为。 英文:Allow an object to alert its behavior when its internal state changes.The object will app 阅读全文
posted @ 2018-04-26 15:42 秋夜雨巷 阅读(216) 评论(0) 推荐(0)
摘要: 定义 访问者(Visitor Pattern)的目的是封装一些施加于某种数据结构元素之上的操作,即使这些操作需要修改,接收这个操作的数据结构却可以保持不变。 英文原话:Represent an operation to be performed on the elements of an objec 阅读全文
posted @ 2018-04-26 11:46 秋夜雨巷 阅读(253) 评论(0) 推荐(0)