Linuxer, ex IBMer. GNU https://hmchzb19.github.io/
全部博文(297)
发布时间:2017-02-11 10:36:41
Proxy Pattern 说白了就是用一个object 去控制另外一个object的access. Usage in JDK:java.lang.reflect.Proxy.java.rmi.*(whole package)看代码比看理论舒服多了.点击(此处)折叠或打开package proxy;interface IFolder{ &nb.........【阅读全文】
发布时间:2017-02-10 11:36:16
Composite pattern 在你需要tree 的时候,会是选择之一。The Composite Pattern allows you to compose object into a tree structure to represent the part-whole hierarchy which means you can create a tree of objects that is made of different parts.but that can be treated as a whole one big thi.........【阅读全文】
发布时间:2017-02-09 09:40:07
把不同的接口通过中间的adapter 连接在一起,概念很简单,看玩具代码很简单。点击(此处)折叠或打开package adapterpattern;class Apple{ public void getAppleColor(String color){ &.........【阅读全文】
发布时间:2017-02-08 10:52:26
就是通过clone() 来创建一个新的对象。代码一看就明白了,java 实现Cloneable()接口而实现的clone() 方法是shallow copy. 点击(此处)折叠或打开package prototypepattern;class Bike implements Cloneable{ &n.........【阅读全文】
发布时间:2017-02-07 10:25:40
The intent of the builder Pattern is to separate the construction of complex object from its representation,so that the same construction process can create different representation. Adding a new implementation (i.e adding a new builder) becomes easier, the object construction process becomes.........【阅读全文】
fireboyz20052010-11-10 18:27
HI, 看到你"http://bbs.chinaunix.net/viewthread.php?tid=1806065"
这里的提问,你是不是在看一本叫《Shell脚本专家指南》的书?我也在阅读,我新手,不如大家交流一下,看到不明白也可以大家一起研究研究。
我的qq是:369035906
或gtalk:jiale.chan@gmail.com