
设计模式
kyhoon
如鱼饮水,冷暖自知。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
讲一讲状态模式
状态模式原创 2021-05-27 09:01:03 · 96 阅读 · 0 评论 -
讲一讲建造者模式
构造者模式原创 2021-05-26 09:03:12 · 88 阅读 · 0 评论 -
讲一讲外观模式
外观模式原创 2021-05-25 09:04:58 · 81 阅读 · 0 评论 -
讲一讲模板方法模式
模板方式模式原创 2021-05-24 09:18:33 · 84 阅读 · 0 评论 -
讲一讲原型模式
原型模式原创 2021-05-21 15:28:06 · 112 阅读 · 0 评论 -
讲一讲代理模式
代理模式原创 2021-05-20 10:15:48 · 98 阅读 · 0 评论 -
讲一讲装饰器模式
装饰器模式原创 2021-05-19 14:51:57 · 114 阅读 · 0 评论 -
讲一讲观察者模式
观察者模式原创 2021-05-13 11:08:26 · 106 阅读 · 0 评论 -
策略模式
首先你需要一个接口,定义需要的行为方法,如下:interface Strategy{ void algorithm();} 然后你需要几个实现了这个接口的实现类,如下public class Strategy1 implements Strategy{ void algorithm(){ System.out.println("this is the Strategy1 algorithm"); ...原创 2021-05-12 13:57:05 · 102 阅读 · 0 评论 -
讲一讲抽象工厂模式
抽象工厂模式原创 2021-03-18 17:18:02 · 107 阅读 · 0 评论 -
讲一讲工厂方法模式
工厂方法原创 2021-03-18 16:36:25 · 100 阅读 · 0 评论 -
简单工厂模式
public interface IProduct { void product();}public class ProductA implements IProduct { public void product() { System.out.println("create product A finish"); }}public class ProductB implements IProduct { public void prod.原创 2021-03-18 14:23:33 · 107 阅读 · 0 评论