
designPattern
鬼王呵
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
工厂方法模式
Define an interface for creating an Object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.工厂方法模式通用类图工厂方法模式通用代码抽象产品类public abstract原创 2016-03-14 22:55:08 · 472 阅读 · 0 评论 -
组合模式
Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.原创 2016-03-21 20:26:59 · 366 阅读 · 0 评论 -
抽象工厂模式
Provide an interface for creating families of related or dependent objects without specifying their concrete classes.原创 2016-03-16 17:08:58 · 286 阅读 · 0 评论 -
观察者模式
Define a one-many dependency between objects so that when one object change state, all its dependents are notified and updated automatically.原创 2016-03-22 10:55:14 · 375 阅读 · 0 评论 -
门面模式
Provide a unified interface to a set of interfaces in a subsystem. Facade defines a higher-level interface that makes the subsystem easier to use.原创 2016-03-23 09:02:33 · 278 阅读 · 0 评论 -
备忘录模式
Without violating encapsulation, capture and externalize an object’s internal state so that the object can be restored to this state later.原创 2016-03-23 14:43:15 · 450 阅读 · 0 评论 -
访问者模式
Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates.原创 2016-03-27 19:09:47 · 302 阅读 · 0 评论 -
状态模式
Allow an object to alter its behavior when its internal state changes, The object will appear to change its class.原创 2016-03-28 14:41:21 · 343 阅读 · 0 评论 -
解释器模式
Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in the language.原创 2016-03-28 15:46:48 · 394 阅读 · 0 评论 -
享元模式
Use sharing to support large numbers of fine-grained objects efficiently.原创 2016-03-29 10:01:34 · 340 阅读 · 0 评论 -
迭代器模式
Provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation.原创 2016-03-20 21:07:11 · 342 阅读 · 0 评论 -
适配器模式
Convert the interface of a class into another interface clients ecpect. Adapter lets classes work together that couldn’t otherwise because of incompatible interfaces.原创 2016-03-20 16:13:06 · 388 阅读 · 0 评论 -
策略模式
Define a family of algorithms, encapsulate each one, and make them interchangeable.原创 2016-03-20 10:48:12 · 395 阅读 · 0 评论 -
单例模式
Singleton PatternEnsure a class has only one instance, and provide a global point of access to it.Singleton Pattern的通用代码饿汉式单例模式public class Singleton {private static final Singleton singleton = new Si原创 2016-03-01 22:38:41 · 425 阅读 · 0 评论 -
模板方法模式
Define the skeleton of an algorithm in an operation, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm’s structur原创 2016-03-16 22:29:30 · 264 阅读 · 0 评论 -
建造者模式
Separate the construction of a complex object from its representation so that the same construction process can create different representations.建造者模式的通用类图建造者模式的通用代码产品类public class Product { /**原创 2016-03-17 11:23:52 · 279 阅读 · 0 评论 -
代理模式
Provide a surrogate or placeholder for another object to control access to it.原创 2016-03-17 19:50:04 · 290 阅读 · 0 评论 -
原型模式
Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.原创 2016-03-18 11:12:59 · 279 阅读 · 0 评论 -
命令模式
Encapsulate a request as object, thereby letting you parameterize clients with different requests, queue or log requests, and support undoable operations.原创 2016-03-18 22:33:36 · 432 阅读 · 0 评论 -
中介者模式
Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each other explicity, and it lets you vary interaction independen原创 2016-03-18 20:22:00 · 311 阅读 · 0 评论 -
责任链模式
Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receiving objects and pass the request along the chain until an object ha原创 2016-03-19 17:19:58 · 325 阅读 · 0 评论 -
装饰模式
Attach additional responsibities to an object dynamically keeping the same interface. Decorators provide a flexible alternative to subclassing for ectending functionality.原创 2016-03-19 21:24:08 · 328 阅读 · 0 评论 -
桥梁模式
Decoople an abstraction from its implementation so that the two can vary independently.原创 2016-03-29 10:33:49 · 455 阅读 · 0 评论