设计模式-行为模式
Java_Super_Man
这个作者很懒,什么都没留下…
展开
-
设计模式--行为模式--状态模式--Java
StateIntent•Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.applicabilityAn object's behavior depends on its state, an原创 2013-03-09 12:56:01 · 1376 阅读 · 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 · 1348 阅读 · 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 · 2792 阅读 · 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 · 917 阅读 · 0 评论 -
设计模式--行为模式--策略模式--Java
IntentDefine 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 · 1293 阅读 · 0 评论