全屏浏览
缩小浏览
回到页首
上一页 1 2 3 4 5 6 7 8 9 ··· 26 下一页
摘要: 模板方法的定义:Define the skeleton of an algorithm in an operation,deferring some steps to subclasses.TemplateMethod lets subclasses redefine certain steps o 阅读全文
posted @ 2018-04-21 09:38 huhx 阅读(589) 评论(0) 推荐(0) 编辑
摘要: 享元模式(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) 编辑
该文被密码保护。 阅读全文
posted @ 2018-03-08 16:38 huhx 阅读(12) 评论(0) 推荐(1) 编辑
摘要: 策略模式(Strategy Pattern)是一种比较简单的模式,也叫做政策模式(Policy Pattern)。其定义如下:Define a family of algorithms,encapsulate each one,and make them interchangeable.(定义一组算 阅读全文
posted @ 2018-01-04 16:22 huhx 阅读(648) 评论(0) 推荐(0) 编辑
摘要: 装饰模式(Decorator Pattern)是一种比较常见的模式,其定义如下:Attach additionalresponsibilities to an object dynamically keeping the same interface.Decorators provide a fle 阅读全文
posted @ 2018-01-04 16:22 huhx 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 通过简单的实例来感觉一下java7和java8的新特性。当那条唯捷径省略了朝拜者,我便在一滴花露中瞬间彻悟。 java7代码实例 一、java7中switch中可以字符串 @Test public void jdk7Switch() { String name = "huhx"; switch (n 阅读全文
posted @ 2017-12-26 16:41 huhx 阅读(433) 评论(0) 推荐(0) 编辑
摘要: 这里面我们对java中的Runtime类做一个简单的了解介绍。若不常想到无常和死,虽有绝顶的聪明,照理说也和呆子一样。 Runtime类的使用 一、得到系统内存的一些信息 @Test public void runtimeInfo() { Runtime runtime = Runtime.getR 阅读全文
posted @ 2017-12-26 16:26 huhx 阅读(11085) 评论(0) 推荐(1) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 26 下一页