• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
山高我为峰
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 ··· 62 63 64 65 66 67 68 69 70 ··· 89 下一页
2016年5月14日
观察者模式
摘要: 观察者模式又叫发布订阅模式,其定义如下: Define a one-to-money dependency between objects so that when one object changes state,all its dependents arenotified and updated 阅读全文
posted @ 2016-05-14 13:54 山高我为峰 阅读(308) 评论(0) 推荐(0)
2016年5月13日
pinyin4j使用示例
摘要: pinyin4j的主页:http://pinyin4j.sourceforge.net/pinyin4j能够根据中文字符获取其对应的拼音,而且拼音的格式可以定制pinyin4j是一个支持将中文转换到拼音的Java开源类库 1.支持简体中文和繁体中文字符 2.支持转换到汉语拼音,通用拼音, 威妥玛拼音 阅读全文
posted @ 2016-05-13 17:36 山高我为峰 阅读(7218) 评论(0) 推荐(0)
迭代器模式
摘要: 迭代器模式定义: Provide a way to access the elements of an aggregate object sequentially without exposingits underlying representation. 它提供了一种方法访问一个容器对象中各个元素 阅读全文
posted @ 2016-05-13 15:12 山高我为峰 阅读(298) 评论(0) 推荐(0)
适配器模式
摘要: 【扩展】一个对象如果不存储实体状体以及对象之间的关系,该对象就叫做贫血对象,对应的领域模型就是贫血领域模型有实体状体和对象关系的模型就是充血领域模型 适配器模式的定义: Convert the interface of a class into another interface clients e 阅读全文
posted @ 2016-05-13 12:29 山高我为峰 阅读(253) 评论(0) 推荐(0)
策略模式
摘要: 策略模式的定义: Define a family of algorithms, encapsulates each one, and make them interchangeable. 定义一组算法,将每个算法都封装起来,并且使它们之间可以互换 策略模式三个角色: Context封装角色:上下文角 阅读全文
posted @ 2016-05-13 10:54 山高我为峰 阅读(292) 评论(0) 推荐(0)
2016年5月12日
装饰模式
摘要: 装饰模式的定义: Attach additional responsibilities to an object dynamically keeping the same interface. Decorators provide a flexible alternativeto subclassi 阅读全文
posted @ 2016-05-12 17:11 山高我为峰 阅读(305) 评论(0) 推荐(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 obj 阅读全文
posted @ 2016-05-12 15:21 山高我为峰 阅读(222) 评论(0) 推荐(0)
命令模式
摘要: 命令模式的定义: Encapsulated a request as an object ,thereby letting you parameterize clients with different requests, queue or log requests,and support undo 阅读全文
posted @ 2016-05-12 13:53 山高我为峰 阅读(310) 评论(0) 推荐(0)
中介者模式
摘要: 中介者模式定义: Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objectsfrom referring to each o 阅读全文
posted @ 2016-05-12 11:39 山高我为峰 阅读(206) 评论(0) 推荐(0)
原型模式
摘要: 原型模式的定义: Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype; 用原型实例指定创建对象的种类,并且通过拷贝 阅读全文
posted @ 2016-05-12 02:12 山高我为峰 阅读(230) 评论(0) 推荐(0)
上一页 1 ··· 62 63 64 65 66 67 68 69 70 ··· 89 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3