- 博客(10)
- 收藏
- 关注
Design Patterns -- Visitor
Visitor 模式是这个系列文章(也是笔者在读的这本书)的最后一个模式。按惯例,首先给出定义:Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of t...
2007-03-13 17:10:00 107
原创 Design Patterns -- Visitor
Visitor 模式是这个系列文章(也是笔者在读的这本书)的最后一个模式。按惯例,首先给出定义:Represent an operation to be performed on the elements of an object structure. Visitor lets you define a new operation without changing the classes of t
2007-03-13 17:10:00 1264
Design Pattern -- Iterator
就Java 开发者而言,Iterator 应该是比较容易理解的模式了。 因为用过Java 集合的人会记得有iterator() 这个函数。应用iterator() 返回Iterator 对象,然后对相应的集合元素进行操作,这就是经典的Iterator 的用法。(当然,Iteartor 还涉及另外一个模式,Factory, 这在之前已经讲过)。在基本的Iterator 模式的定义里是这样讲的:“P...
2007-03-12 13:59:00 89
原创 Design Pattern -- Iterator
就Java 开发者而言,Iterator 应该是比较容易理解的模式了。 因为用过Java 集合的人会记得有iterator() 这个函数。应用iterator() 返回Iterator 对象,然后对相应的集合元素进行操作,这就是经典的Iterator 的用法。(当然,Iteartor 还涉及另外一个模式,Factory, 这在之前已经讲过)。在基本的Iterator 模式的定义里是这样讲的:“
2007-03-12 13:59:00 1136
Design Pattern -- Decorator
Decorator 模式, 其功能为;Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality. 类图表示为:解释一下这张图,这个模式主要有两点:1。所需功...
2007-03-09 14:36:00 95
原创 Design Pattern -- Decorator
Decorator 模式, 其功能为;Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending functionality. 类图表示为:解释一下这张图,这个模式主要有两点:1
2007-03-09 14:36:00 1279
Liskov Substitution Principle
Liskov Substitution Principle, 由Barbara Liskov 和 Jeannette Wing在93年提出,其原文为:“Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a sub...
2007-03-08 11:15:00 111
原创 Liskov Substitution Principle
Liskov Substitution Principle, 由Barbara Liskov 和 Jeannette Wing在93年提出,其原文为:“Let q(x) be a property provable about objects x of type T. Then q(y) should be true for objects y of type S where S is a sub
2007-03-08 11:15:00 1559
CheckStyle的自定义开发
CheckStyle,正如名字所表示的,是用来检查Java Style的。它的开发站点(http://checkstyle.sourceforge.net/index.html)上的说明是“Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. ”...
2007-03-05 11:17:00 354
原创 CheckStyle的自定义开发
CheckStyle,正如名字所表示的,是用来检查Java Style的。它的开发站点(http://checkstyle.sourceforge.net/index.html)上的说明是“Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. ”
2007-03-05 11:17:00 5313 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人