
设计模式-行为模式
Java_Super_Man
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
设计模式--行为模式--状态模式--Java
State Intent •Allow an object to alter its behavior when its internal state changes. The object will appear to change its class. applicability An object's behavior depends on its state, an原创 2013-03-09 12:56:01 · 1502 阅读 · 0 评论 -
设计模式--行为模式--NULL Object--Java
NULL OBJECT Patterns 第一次发现此模式时,是由于Bob大叔的经典著作《Agile Principles, Patterns, and Practices In C#》! 下面是出自书中的例子作为引例: Employee e = DB.GetEmployee("Bob"); if (e != nul原创 2013-03-09 14:12:25 · 1396 阅读 · 0 评论 -
设计模式--行为模式--Collecting Parameter--Java
Collecting Parameter 场景 You have a single bulky method that accumulates information to a local variable. 你有一个较长方法,其主要为了积累局部信息。 定义 A Collecting Parameter is an object that you pass to method原创 2013-03-11 11:23:16 · 2928 阅读 · 1 评论 -
设计模式--行为模式--迭代模式--Java
Intent 目的 Providea way to access the elements of an aggregate object sequentially withoutexposing its underlying representation. 提供一种方法顺序访问一个聚合对象中各个元素, 而又不需暴露该对象的内部表示。 applicability 适应性 to a原创 2013-03-17 22:11:25 · 970 阅读 · 0 评论 -
设计模式--行为模式--策略模式--Java
Intent Define a family of algorithms, encapsulate each one, and make the minter changeable. Strategy lets the algorithm vary independently from clients that use it. 定义一套算法进行封装,使得可以改变。策略使得算法在调用段可以独立变原创 2013-03-17 22:27:37 · 1375 阅读 · 0 评论