1 Star 0 Fork 0

NewGr8Player / DesignPattern

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

设计模式示例代码

目录结构

  • 源码
    • principle 设计原则
      • p1 单一职责原则 Single Responsibility Principle,SRP
      • p2 里氏替换原则 Liskov Substitution Principle,LSP
      • p3 依赖倒置原则 Dependence Inversion Principle,DIP
      • p4 接口隔离原则 Interface Segregation Principle,ISP
      • p5 最少知识原则/迪米特法则 Least Knowledge Principle,LKP / Law of Demeter,LoD
      • p6 开闭原则 Open Closed Principle,OCP
    • pattern 设计模式
      • creational创建型模式
        • c1 单例模式 The SingletonBasic Pattern
          • s1 懒汉式
          • s2 饿汉式
          • s3 静态内部类
          • s4 枚举
        • c2 工厂模式 The Factory Pattern
        • c3 抽象工厂模式 The Abstract Factory Pattern
        • c4 原型模式 The Prototype Pattern
        • c5 建造者模式 Builder Pattern
      • structural 结构型模式
        • s1 适配器模式 The Adapter Pattern
          • a1 类适配器
          • a2 对象适配器
          • a3 接口适配器
        • s2 组合模式 The Composite Pattern
        • s3 装饰模式 The Decorator Pattern
        • s4 外观模式 The Facade Pattern
        • s5 代理模式 The Proxy Pattern
          • p1 静态代理
          • p2 JDK代理
          • p3 CGLIB代理
        • s6 桥接模式 The Bridge Pattern
        • s7 享元模式 (The Flyweight Pattern)
      • behavioral 行为型模式
        • 责任链式 Chain of Responsibility Pattern
        • 命令模式 The Command Pattern
        • 解释器模式 The Interpreter Pattern
        • 迭代器模式 The Iterator Pattern
        • 中介者模式 The Mediator Pattern
        • 观察者模式 The Observer Pattern
        • 状态模式 The State Pattern
        • 策略模式 The Strategy Pattern
        • 模版模式 The Template Pattern
        • 访问者模式 The Visitor Pattern
        • 备忘录模式 The Memento Pattern
  • 单元测试
    • principle 设计原则测试
      • p1 单一职责原则测试 SingleResponsibilityPrincipleTest
      • p2 里氏替换原则测试 LiskovSubstitutionPrincipleTest
      • p3 依赖倒置原则测试 DependenceInversionPrincipleTest
      • p4 接口隔离原则测试 InterfaceSegregationPrincipleTest
      • p5 最少知识原则测试/迪米特法则测试 LeastKnowledgePrincipleTest
      • p6 开闭原则测试 OpenClosedPrincipleTest
    • pattern 设计模式
      • creational 创建型模式
        • c1 单例模式测试 SingletonBasicPatternTest
        • c2 工厂模式测试 FactoryPatternTest
        • c3 抽象工厂模式测试 AbstractFactoryPatternTest
        • c4 原型模式测试 PrototypePatternTest
        • c5 建造者模式测试 BuilderPatternTest
      • structural 结构型模式
        • s1 适配器模式测试 AdapterPatternTest
        • s2 组合模式测试 CompositePatternTest
        • s3 装饰模式测试 DecoratorPatternTest
        • s4 外观模式测试 FacadePatternTest
        • s5 代理模式测试 ProxyPatternTest
        • s6 桥接模式测试 BridgePatternTest
        • s7 享元模式测试 FlyweightPatternTest
      • behavioral 行为型模式
        • 责任链式测试 ChainOfResponsibilityPatternTest
        • 命令模式测试 CommandPatternTest
        • 解释器模式测试 InterpreterPatternTest
        • 迭代器模式测试 IteratorPatternTest
        • 中介者模式测试 MediatorPatternTest
        • 观察者模式测试 ObserverPatternTest
        • 状态模式测试 StatePatternTest
        • 策略模式测试 StrategyPatternTest
        • 模版模式测试 TemplatePatternTest
        • 访问者模式测试 VisitorPatternTest
        • 备忘录模式测试 MementoPatternTest
MIT License Copyright (c) 2018 FengZeming Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

设计模式Demo 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/NewGr8Player/DesignPattern.git
git@gitee.com:NewGr8Player/DesignPattern.git
NewGr8Player
DesignPattern
DesignPattern
master

搜索帮助

14c37bed 8189591 565d56ea 8189591