Chinaunix

标题: 设计模式 [打印本页]

作者: imxhf    时间: 2008-12-14 16:25
标题: 设计模式
1、Adapter型:内容和形式的结合
  class Adapter 实现interface来满足所需的形式,继承一个class来得到所需的内容
  object Adapter 继承一个class(多为实现了某interface的class)来满足所需的形式,reference一
  个class来得到所需的内容
  例如:WindowAdapter、MouseAdapter、AbstractTableModel等


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/85165/showart_1719941.html




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2