Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ENCEC/DesignPatternsAllExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

37 Commits

Repository files navigation

这个项目将包含大部分设计模式的例子(更新中)
1、设计模式学习的笔记
2、src目录下每一个包,表示一种设计模式
3、每一种设计模式包下,有一个ReadMe文件用于说明该设计模式
4、nouse下为不使用设计模式的代码
5、use下为使用设计模式的代码

目录
策略模式:strategy
观察者模式:observer
装饰模式:decorator
简单工厂模式:simpleFactory
工厂方法模式:factoryMethod
抽象工厂模式:abstractFactory
单例模式:singleton
命令模式:command
适配器模式:adapter
外观模式:facade
模板方法模式:templateMethod
迭代器模式:iterator
组合模式:composite
状态模式:state
代理模式:proxy
桥接模式:bridge
建造者模式:builder
职责链模式:chainOfResponsibility
享元模式:flyweight
解释器模式:interpreter
中介者模式:mediator
备忘录模式:memento
原型模式:prototype
访问者模式:visitor









#并非所有情况都适合设计模式,在没有足够的经验前,多阅读一些其他实际源码的例子或许能给你更多的启发
本人可能对一些设计模式理解有问题,如果写的不正确,还请高手指出,万分感谢

About

设计模式简单例子

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%

AltStyle によって変換されたページ (->オリジナル) /