Skip to content

cc1024201/GoF23

Repository files navigation

设计模式

这是一个关于设计模式的实现的项目。其中包含了 23 种经典的设计模式,每种模式都有对应的代码实现和详细的说明。

创建型模式

  • 工厂方法模式 Factory Method Pattern
  • 抽象工厂模式 Abstract Factory Pattern
  • 单例模式 Singleton Pattern
  • 建造者模式 Builder Pattern
  • 原型模式 Prototype Pattern

结构型模式

  • 适配器模式 Adapter Pattern
  • 桥接模式 Bridge Pattern
  • 组合模式 Composite Pattern
  • 装饰器模式 Decorator Pattern
  • 外观模式 Facade Pattern
  • 享元模式 Flyweight Pattern
  • 代理模式 Proxy Pattern

行为型模式

  • 职责链模式 Chain of Responsibility Pattern
  • 命令模式 Command Pattern
  • 解释器模式 Interpreter Pattern
  • 迭代器模式 Iterator Pattern
  • 中介者模式 Mediator Pattern
  • 备忘录模式 Memento Pattern
  • 观察者模式 Observer Pattern
  • 状态模式 State Pattern
  • 策略模式 Strategy Pattern
  • 模板方法模式 Template Method Pattern
  • 访问者模式 Visitor Pattern

/**

  • xxx模式
  • 定义:xxx, xxx
  • 类型:xxx
  • 适用场景:
  • xxx
  • 优点:
  • xxx
  • 缺点:
  • xxx
  • 结构:
  • xxx
  • 案例:
  • xxx
  • 代码实现:
  • 以xxx为例,xxx, xxx */ 把上述注释补充完整 进行代码实现,要可以运行,代码要有注释,要有测试用例

About

图解设计模式

Resources

Stars

Watchers

Forks