随笔分类 - 行为型模式--设计模式
摘要:迭代器模式迭代器模式(Iterator Pattern) 是最常被使用的几个模式之一,被广泛地应用到java的API中。例如,Java的集合(Collection)框架中,就广泛使用迭代器来遍历集合中的元素。1迭代器模式的定义迭代器模式的英文原文:Provide a way to access th
阅读全文
摘要:策略模式策略模式(Strategy Pattern)也叫政策模式。是一种比较简单的模式。1策略模式的定义策略模式的英文原文是:Define a family of algorithms,encapsulate each one,and make them interchangeable.意思是:定义
阅读全文
摘要:责任链模式责任链模式(Chain of Responsibility Pattern)是一种常见的行为模式。1责任链模式的定义责任链的英文原文是:Avoid coupling the sender of a request to its receiver by giving more than on
阅读全文
摘要:模板方法模式 模板方法模式(Tempate Method Pattern) 是一种简单的、常见的且应用非常广泛的模式。 1模板方法模式的定义 模板方法模式的英文原文是: Define the skeleton of an algorithm in an operation, deferring so
阅读全文

浙公网安备 33010602011771号