摘要:
概念: 解释器模式:Given a language, define a representation for its grammar along with an interpreter that uses the representation to interpret sentences in t 阅读全文
posted @ 2019-07-04 18:19
Mario0315
阅读(162)
评论(0)
推荐(0)
摘要:
概念: 状态模式:Allow an object to alter its benhavior when its internal state changes. The object will appear to change its class. 当一个对象内在状态改变是允许改变行为,这个对象看起 阅读全文
posted @ 2019-07-04 18:15
Mario0315
阅读(192)
评论(0)
推荐(0)
摘要:
概念: 访问者模式:Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the 阅读全文
posted @ 2019-07-04 18:09
Mario0315
阅读(152)
评论(0)
推荐(0)
摘要:
概念: 备忘录模式:Without violating encapsulation, capture and externalize an object's internal state so that the object can be restored to this state later. 阅读全文
posted @ 2019-07-04 18:03
Mario0315
阅读(153)
评论(0)
推荐(0)
摘要:
概念: 观察者模式:Define a one-to-many dependency between objects so that when one object changes state, all its dependents are notifued and updated automatic 阅读全文
posted @ 2019-07-04 17:39
Mario0315
阅读(141)
评论(0)
推荐(0)
摘要:
概念: 中介者模式:Define an object that encapsulates how a set of objects interact. Mediator promotes loose coupling by keeping objects from referring to each 阅读全文
posted @ 2019-07-04 17:36
Mario0315
阅读(178)
评论(0)
推荐(0)
摘要:
概念: 迭代器模式:Provide a way to access the elements of an aggregarte object sequentiaally with exposing its underlying representation. 提供一种访问容器对象内每个元素的一种方式 阅读全文
posted @ 2019-07-04 17:05
Mario0315
阅读(105)
评论(0)
推荐(0)
摘要:
概念: 策略模式:Define a family of algorithms, encapsulate each one, and make them interchangeable. 定义一组算法,封装每个算法,并使他们之间可以互相转换。实现: 抽象的策略类 具体的策略实现类 总的调用类 测试及结 阅读全文
posted @ 2019-07-04 16:47
Mario0315
阅读(171)
评论(0)
推荐(0)
摘要:
概念: 责任链模式:Avoid coupling the sender of a request to its receiver by giving more than one object a chance to handle the request. Chain the receivering 阅读全文
posted @ 2019-07-04 16:24
Mario0315
阅读(138)
评论(0)
推荐(0)
摘要:
概念: 命令模式:Encapsulates a request as an object, thereby letting you parameterize clients with different requests, queue or log requests, and support und 阅读全文
posted @ 2019-07-04 16:19
Mario0315
阅读(142)
评论(0)
推荐(0)
摘要:
概念: 模版方法模式:Define the skeleton of an algoritm in an operation, deferring some step to subclasses. Template Method lets subclasses redefine certain ste 阅读全文
posted @ 2019-07-04 16:14
Mario0315
阅读(100)
评论(0)
推荐(0)
摘要:
概念: 享元模式:Use sharing to support large numbers of fine-gained object efficiently.使用享元模式可以有效地支持大量的细粒度额对象。这中英文翻译过来的定义,是不是看的一头雾水。简单来说就是结合工厂模式的对象池。看代码,其实倒不 阅读全文
posted @ 2019-07-04 16:11
Mario0315
阅读(117)
评论(0)
推荐(0)

浙公网安备 33010602011771号