摘要: 工厂方法模式定义 工厂方法模式的使用频率非常高,在我们日常的开发过程中总能见到它的身影。其定义为:Define an interface for creating an object,but let subclasses decide which class to instantiate.Facto 阅读全文
posted @ 2018-11-25 12:22 过向往的生活 阅读(210) 评论(0) 推荐(0) 编辑
摘要: 单例模式定义 单例模式是一个比较简单的模式,其定义如下:Ensure a class has only one instance,and provide a global point of access to it.确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例。 单例模式应用场景 阅读全文
posted @ 2018-11-25 10:41 过向往的生活 阅读(179) 评论(0) 推荐(0) 编辑