![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Design pattern
文章平均质量分 79
michaelljx
这个作者很懒,什么都没留下…
展开
-
Strategy Pattern的位置
I'm including an encapsulation hierarchy table of several of the GoF design patterns to help explain the differences between these two patterns. Hopefully it better illustrates what each encapsula...原创 2011-12-12 10:02:48 · 66 阅读 · 0 评论 -
Command vs Strategy
public class ConcreteStrategy implements BaseStrategy { @Override public void execute(Object argument) { // Work with passed-in argument. }} public class ConcreteCo...原创 2011-12-16 15:24:36 · 144 阅读 · 0 评论 -
Minimize the accessibility of classes and members
The rule of thumb is simple: make each class or member as inaccessible aspossible. In other words, use the lowest possible access level consistent with theproper functioning of the software that y...原创 2011-12-31 14:07:41 · 101 阅读 · 0 评论 -
Favor static member classes over nonstatic
One common use of a static member class is as a public helper class, usefulonly in conjunction with its outer class. For example, consider an enum describingthe operations supported by a calculato...原创 2012-01-04 11:41:22 · 130 阅读 · 0 评论 -
Eliminate unchecked warnings
When you program with generics, you will see many compiler warnings:unchecked cast warnings, unchecked method invocation warnings, uncheckedgeneric array creation warnings, and unchecked conversio...原创 2012-01-04 16:34:52 · 117 阅读 · 0 评论