
设计模式
_七点十七_
不要因为走的太远 而忘记为什么出发
展开
-
设计模式笔记_5_迪米特法则
package com.maom.design.P_5_Law_Of_Demeter;/** * @Title: P_5_Law_Of_Demeter * @Description: 5_迪米特法则 * @Author maohb * @Version 1.0 */public class P_5_Law_Of_Demeter { public static void m...原创 2020-04-23 16:19:50 · 87 阅读 · 0 评论 -
设计模式笔记_4_依赖倒转原则
package com.maom.design.P_4_Dependence_Inversion_Principle;/** * @Title: P_4_Dependence_Inversion_Principle * @Description: 4_依赖倒转原则 * @Author maohb * @Version 1.0 */public class P_4_Dependenc...原创 2020-04-23 16:18:07 · 110 阅读 · 0 评论 -
设计模式笔记_3. 里氏替换原则
package com.maom.design.P_3_Liskov_Substitution_Principle;/** * @Title: P_3_Liskov_Substitution_Principle * @Description: 3. 里氏替换原则 * @Author maohb * @Version 1.0 */public class P_3_Liskov_Sub...原创 2020-04-23 16:16:45 · 93 阅读 · 0 评论 -
设计模式笔记_2. 单一职责原则
原:package com.maom.design.P_2_Single_Responsibility_Principle;import java.util.Scanner;/** * @Title: P_2_Single_Responsibility_Principle * @Description: 2. 单一职责原则 * @Author maohb * @Version 1...原创 2020-04-23 16:13:47 · 115 阅读 · 0 评论 -
设计模式笔记_1. 开放封闭原则
原:package com.maom.design.P_1_Open_Closed_Principle;/** * @Title: P_1_Open_Closed_Principle_0 * @Description: 1. 开放封闭原则 * @Author maohb * @Version 1.0 */public class P_1_Open_Closed_Principle...原创 2020-04-23 16:11:15 · 95 阅读 · 0 评论 -
设计模式笔记_25_访问者模式
package com.maom.design.D_25_Visitor;/** * @Title: D_25_Visitor * @Description: 25_访问者模式 * @Author maohb * @Version 1.0 */public class D_25_Visitor { public static void main(String[] args...原创 2020-04-23 16:04:34 · 123 阅读 · 0 评论 -
设计模式笔记_24_命令模式
package com.maom.design.D_24_Command;import java.util.ArrayList;import java.util.List;/** * @Title: D_24_Command * @Description: 24_命令模式 * @Author maohb * @Version 1.0 */public class D_24_C...原创 2020-04-23 16:03:06 · 100 阅读 · 0 评论 -
设计模式笔记_23_状态模式
Apackage com.maom.design.D_23_State.A;/** * @Title: D_23_State_A * @Description: 23_状态模式 * @Author maohb * @Version 1.0 */public class D_23_State_A { public static void main(String[] arg...原创 2020-04-23 16:01:37 · 94 阅读 · 0 评论 -
设计模式笔记_22_备忘录模式
package com.maom.design.D_22_Memento;/** * @Title: D_22_Memento * @Description: 22_备忘录模式 * @Author maohb * @Version 1.0 */public class D_22_Memento { public static void main(String[] args...原创 2020-04-23 15:58:30 · 80 阅读 · 0 评论 -
设计模式笔记_21_模版方法模式
package com.maom.design.D_21_TemplateMethod;/** * @Title: D_21_TemplateMethod * @Description: 21_模版方法模式 * @Author maohb * @Version 1.0 */public class D_21_TemplateMethod { public static v...原创 2020-04-23 15:56:33 · 87 阅读 · 0 评论 -
设计模式笔记_20_迭代模式
package com.maom.design.D_20_Iterator;import java.util.ArrayList;import java.util.Iterator;import java.util.List;/** * @Title: D_20_Iterator * @Description: 20_迭代模式 * @Author maohb * @Versio...原创 2020-04-23 15:54:10 · 89 阅读 · 0 评论 -
设计模式笔记_19_职责链模式
package com.maom.design.D_19_ChainOfResponsibility;/** * @Title: D_19_ChainOfResponsibility * @Description: 19_职责链模式 * @Author maohb * @Version 1.0 */public class D_19_ChainOfResponsibility {...原创 2020-04-23 15:48:22 · 105 阅读 · 0 评论 -
设计模式笔记_18_中介者模式
package com.maom.design.D_18_Mediator;/** * @Title: D_18_Mediator * @Description: 18_中介者模式 * @Author maohb * @Version 1.0 */public class D_18_Mediator { public static void main(String[] a...原创 2020-04-23 15:47:04 · 94 阅读 · 0 评论 -
设计模式笔记_17_解释器模式
package com.maom.design.D_17_Interpreter;import java.util.ArrayList;import java.util.List;/** * @Title: D_17_Interpreter * @Description: 17_解释器模式 * @Author maohb * @Version 1.0 */public cla...原创 2020-04-23 15:44:55 · 82 阅读 · 0 评论 -
设计模式笔记_16_适配器模式
package com.maom.design.D_16_Adapter;/** * @Title: D_16_Adapter * @Description: 16_适配器模式 * @Author maohb * @Version 1.0 */public class D_16_Adapter { public static void main(String[] args...原创 2020-04-23 15:37:04 · 93 阅读 · 0 评论 -
设计模式笔记_15_桥接模式
package com.maom.design.D_15_Bridge;/** * @Title: D_15_Bridge * @Description: 15_桥接模式 * @Author maohb * @Version 1.0 */public class D_15_Bridge { public static void main(String[] args) {...原创 2020-04-23 15:33:16 · 150 阅读 · 0 评论 -
设计模式笔记_14_组合模式
package com.maom.design.D_14_Composite;import java.util.ArrayList;import java.util.List;/** * @Title: D_14_Composite * @Description: 14_组合模式 * @Author maohb * @Version 1.0 */public class D_...原创 2020-04-23 15:31:43 · 102 阅读 · 0 评论 -
设计模式笔记_13_外观模式
package com.maom.design.D_13_Facade;/** * @Title: D_13_Facade * @Description: 13_外观模式 * @Author maohb * @Version 1.0 */public class D_13_Facade { public static void main(String[] args) {...原创 2020-04-23 15:30:48 · 85 阅读 · 0 评论 -
设计模式笔记_12_代理模式
package com.maom.design.D_12_Proxy;/** * @Title: D_12_Proxy * @Description: 12_代理模式 * @Author maohb * @Version 1.0 */public class D_12_Proxy { public static void main(String[] args) { ...原创 2020-04-23 15:29:37 · 82 阅读 · 0 评论 -
设计模式笔记_12_动态代理
package com.maom.design.D_12_Proxy;import java.lang.reflect.InvocationHandler;import java.lang.reflect.InvocationTargetException;import java.lang.reflect.Method;import java.lang.reflect.Proxy;/...原创 2020-04-23 15:24:47 · 103 阅读 · 0 评论 -
设计模式笔记_11_享元模式
package com.maom.design.D_11_Flyweight;import java.util.HashMap;import java.util.Map;/** * @Title: D_11_Flyweight * @Description: 11_享元模式 * @Author maohb * @Version 1.0 */public class D_11_...原创 2020-04-23 15:20:52 · 85 阅读 · 0 评论 -
设计模式笔记_10_观察者模式2
package com.maom.design.D_10_Observer;import java.util.Observable;import java.util.Observer;/** * @Title: D_10_Observer * @Description: 10_观察者模式 * @Author maohb * @Version 1.0 */public cla...原创 2020-04-23 15:19:31 · 94 阅读 · 0 评论 -
设计模式笔记_10_观察者模式
package com.maom.design.D_10_Observer;import java.util.Observable;import java.util.Observer;/** * @Title: D_10_Observer * @Description: 10_观察者模式 * @Author maohb * @Version 1.0 */public clas...原创 2020-04-23 15:18:23 · 83 阅读 · 0 评论 -
设计模式笔记_09_策略模式
package com.maom.design.D_09_Strategy;/** * @Title: D_09_Strategy * @Description: 09_策略模式 * @Author maohb * @Version 1.0 */public class D_09_Strategy { public static void main(String[] ar...原创 2020-04-23 15:16:50 · 81 阅读 · 0 评论 -
设计模式笔记_08_装饰模式
package com.maom.design.D_08_Decorator;/** * @Title: D_08_Decorator * @Description: 08_装饰模式 * @Author maohb * @Version 1.0 */public class D_08_Decorator { public static void main(String[]...原创 2020-04-23 15:15:44 · 87 阅读 · 0 评论 -
设计模式笔记_07_建造者模式
package com.maom.design.D_07_Builder;/** * @Title: D_07_Builder * @Description: 07_建造者模式 * @Author maohb * @Version 1.0 */public class D_07_Builder { public static void main(String[] args...原创 2020-04-23 15:14:41 · 95 阅读 · 0 评论 -
设计模式笔记_06_原型模式
package com.maom.design.D_06_Prototype;import java.io.Serializable;import java.util.ArrayList;import java.util.List;/** * @Title: D_06_Prototype * @Description: 06_原型模式 * @Author maohb * @Ve...原创 2020-04-23 15:13:09 · 118 阅读 · 0 评论 -
设计模式笔记_05_单例模式
package com.maom.design.D_05_Singleton;/** * @Title: D_05_Singleton * @Description: 05_单例模式 * @Author maohb * @Version 1.0 */public class D_05_Singleton { public static void main(String[]...原创 2020-04-23 15:11:59 · 83 阅读 · 0 评论 -
设计模式笔记_04_工厂模式应用_计算器
package com.maom.design.D_04_Test_Factory_Calculator;import java.util.Scanner;/** * @Title: D_04_Test_Factory_Calculator * @Description: 04_工厂模式应用_计算器 * @Author maohb * @Version 1.0 */public...原创 2020-04-23 15:10:17 · 91 阅读 · 0 评论 -
设计模式笔记_03_抽象工厂模式
package com.maom.design.D_03_AbstractFactory;/** * @Title: D_03_AbstractFactory * @Description: 03_抽象工厂模式 * @Author maohb * @Version 1.0 */public class D_03_AbstractFactory { public stati...原创 2020-04-23 15:08:38 · 95 阅读 · 0 评论 -
设计模式笔记_02_工厂方法模式
package com.maom.design.D_02_FactoryMethod;/** * @Title: D_02_FactoryMethod * @Description: 02_工厂方法模式 * @Author maohb * @Version 1.0 */public class D_02_FactoryMethod { public static void...原创 2020-04-23 15:06:14 · 78 阅读 · 0 评论 -
设计模式笔记_01_简单工厂模式
package com.maom.design.D_01_SimpleFactory;/** * @Title: D_01_SimpleFactory * @Description: 01_简单工厂模式 * @Author maohb * @Version 1.0 */public class D_01_SimpleFactory { public static void...原创 2020-04-23 15:02:23 · 76 阅读 · 0 评论