• 访问者模式

    访问者模式-VisitorPatternWHAT定义Representanoperationtobeperformedontheelementsofanobjectstructure.Visitorletsyoudefineanewoperationwithoutchangingtheclasses...

    备忘录模式

    备忘录模式-MementoPattern,一种弥补真实世界缺陷的方法,一个对象的备份模式,提供一种程序数据的备份方法WHAT定义Withoutviolatingencapsulation,captureandexternalizeanobject'sinternalstatesothatobject...

    门面模式

    门面模式--FacadePattern,也叫做外观模式WHAT定义Provideaunifiedinterfacetoasetofinterfacesinasubsystem.Facadedefinesahigher-levelinterfacethatmakesthesubsystemeasier...

    观察者模式

    观察者模式-ObserverPattern,也叫做发布订阅模式(Publish/subscribe)WHAT定义Defineaone-to-manydependencybetweenobjectssothatwhenoneobjectchangesstate,allitsdependentsaren...

    组合模式

    组合模式-CompositePattern,也叫合成模式,又叫做部分-整体模式(Part-Whole)WHAT主要用来描述部分与整体的关系定义Composeobjectsintotreestructurestorepresentpart-wholehierarchies.Compositeletsc...

    迭代器模式

    迭代器模式-IteratorPatternWHAT定义provideawaytoaccesstheelementsofanaggregateobjectsequentiallywithoutexposingitsunderlyingrepresentation它提供一种方法访问一个容器对象中各个元素...

    适配器模式

    适配器模式-AdapterPattern,又叫做变压器模式,也叫做包装模式(Wrapper)。WHAT定义Converttheinterfaceofaclassintoanotherinterfaceclientsexpect.Adapterletsclassesworktogetherthatco...

    策略模式

    WHAT策略模式-StrategyPattern,也叫政策模式(PolicyPattern)定义Defineafamilyofalgorithms,encapsulateeachone,andmaketheminterchangeable.定义一组算法,将每个算法都封装起来,并且使它们之间可以互换。...

    装饰模式

    装饰模式-DecoratorPatternWHAT定义Attachadditionalresponsibilitiestoanobjectdynamicallykeepingthesameinterface.Decoratorsprovideaflexiblealternativetosubclas...

    责任链模式

    责任链模式-ChainofResponsibilityPatternWHAT定义Avoidcouplingthesenderofarequesttoitsreceiverbygivingmorethanoneobjectachancetohandletherequest.Chainthereceiv...