From 8013de28b1d7075b2bb23c0388a4ec7e176ba5e2 Mon Sep 17 00:00:00 2001 From: qi_liang Date: Sun, 22 Dec 2019 15:29:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=BF=BD=E7=95=A5=E6=96=87?= =?UTF-8?q?=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .ignore | 2 ++ README.md | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .ignore diff --git a/.ignore b/.ignore new file mode 100644 index 0000000..d4b0c5a --- /dev/null +++ b/.ignore @@ -0,0 +1,2 @@ +*.iml +.idea \ No newline at end of file diff --git a/README.md b/README.md index 64bb0c2..e7ed7d1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # pattern -pattern 介绍 +##pattern 介绍 23种设计模式(java源码实现) 来源于:《图解设计模式》 pattern 安装教程 @@ -11,6 +11,7 @@ pattern 安装教程 摘抄博客:https://www.cnblogs.com/xiaobaizhang/p/7778494.html +```java 1. 单一职能 不要存在多于一个导致类变更的原因即一个类只负责一项职责 @@ -88,6 +89,9 @@ pattern 安装教程 总结:单一职责告诉我们类的功能尽量单一;里氏替换告诉我们不要破坏继承体系;依赖倒置告诉我们要面向接口编程;接口隔离告诉我们设计接口的时候要精简单一; 迪米特告诉告诉我们要降低耦合;开闭原则是总纲,告诉我们要对修改关闭,对扩张开放 + + +``` 设计模式模型