1. Strategy Deisgn Pattern
ZH: Comparator 是策略模式(strategy design pattern),就是不改变对象自身,而用一个策略对象(strategy object)来改变它的行为
EN: Comparator is kind of strategy design pattern, that means Object won't change selives anyway, while making user of another object so-called strategy Object to implement the intention of changing behaviour or status.
Demo: comparator in [url]http://rossbu.iteye.com/blog/245991[/url]
ZH: Comparator 是策略模式(strategy design pattern),就是不改变对象自身,而用一个策略对象(strategy object)来改变它的行为
EN: Comparator is kind of strategy design pattern, that means Object won't change selives anyway, while making user of another object so-called strategy Object to implement the intention of changing behaviour or status.
Demo: comparator in [url]http://rossbu.iteye.com/blog/245991[/url]
本文介绍策略模式的概念,并通过Comparator的具体实现进行演示。策略模式是一种行为设计模式,它使您可以在运行时更改对象的行为。Comparator作为策略模式的一种实现方式,允许在不修改对象本身的情况下改变其排序或比较行为。

332

被折叠的 条评论
为什么被折叠?



