摘要:
模板方法模式定义:defines the skeleton of an algorithm in a method, deferring some steps to subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithm's structure.定义一个方法操作算法的框架(骨架结构),而将一些步骤延迟到子类中。 阅读全文
摘要:
一、Android源码学习之装饰模式应用装饰模式定义:Attach additional responsibilities to an object dynamically keeping the same interface. Decoators provide a flexible alternative to subclassing for extending functionality.动态地给一个对象添加一些额外的职责。就增加功能来说,装饰模式相比生成子类更为灵活。二、Android源码学习之单例模式应用单例模式定义:Ensure a class has only one insta 阅读全文