Stay Hungry,Stay Foolish!

摘要: 抽象工厂 https://blog.csdn.net/wyxhd2008/article/details/5597975 首先来看看这两者的定义区别: 工厂模式:定义一个用于创建对象的借口,让子类决定实例化哪一个类 抽象工厂模式:为创建一组相关或相互依赖的对象提供一个接口,而且无需指定他们的具体类 阅读全文
posted @ 2018-03-27 01:57 lightsong 阅读(293) 评论(0) 推荐(0)
摘要: 策略模式 https://en.wikipedia.org/wiki/Strategy_pattern In computer programming, the strategy pattern (also known as the policy pattern) is a behavioral s 阅读全文
posted @ 2018-03-27 01:47 lightsong 阅读(420) 评论(0) 推荐(0)
摘要: Proxy https://en.m.wikipedia.org/wiki/Proxy 代理人 与 被代理人 是 一对一的关系。 A proxy is an agent or substitute authorized to act for another person or a document 阅读全文
posted @ 2018-03-27 01:21 lightsong 阅读(620) 评论(0) 推荐(0)
摘要: 类创建实例一般方式 http://groovy-lang.org/objectorientation.html#_class class Person { String name Integer age def increaseAge(Integer years) { this.age += yea 阅读全文
posted @ 2018-03-27 00:26 lightsong 阅读(582) 评论(0) 推荐(0)
千山鸟飞绝,万径人踪灭