设计模式
IT_雪夜归人
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
设计模式--单例模式
单例模式(Singleton Pattern)是一个比较简单的模式,其定义如下:Ensure a class has only one instance, and provide a global point of access to it. (确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。) 单例模式通用代码:public class Singleton { pri原创 2017-05-30 14:07:46 · 413 阅读 · 0 评论 -
设计模式--工厂模式
工厂方法模式使用的频率非常高,在我们日常的开发中总能见到它的身影。 Define an interface for creating an object,but let subclasses decide which class to instantiate.Factory Method lets a class defer instantiation to subclasses.(定义一个用原创 2017-06-03 15:00:55 · 268 阅读 · 0 评论
分享