全屏浏览
缩小浏览
回到页首
摘要: 享元模式(Flyweight Pattern)是池技术的重要实现方式,其定义如下:Use sharing tosupport large numbers of fine-grained objects efficiently.(使用共享对象可有效地支持大量的细粒度的对象。) 享元模式的使用 享元模式 阅读全文
posted @ 2018-04-18 20:14 huhx 阅读(872) 评论(0) 推荐(0) 编辑
摘要: 桥梁模式(Bridge Pattern)也叫做桥接模式,是一个比较简单的模式,其定义如下:Decouple an abstraction from its implementation so that the two can vary independently.(将抽象和实现解耦,使得两者可以独立 阅读全文
posted @ 2018-04-18 20:09 huhx 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 适配器模式(Adapter Pattern)又叫做变压器模式,也叫做包装模式(Wrapper),但是包装模式可不止一个,还包括装饰模式。它的定义如下:Convert the interface of a class into another interface clients expect.Adap 阅读全文
posted @ 2018-04-18 20:07 huhx 阅读(448) 评论(0) 推荐(0) 编辑
摘要: 命令模式是一个高内聚的模式,其定义为:Encapsulate a request as an object,thereby letting you parameterize clients with different requests,queue or log requests,and suppo 阅读全文
posted @ 2018-04-18 19:29 huhx 阅读(664) 评论(0) 推荐(0) 编辑