/**
* 声明一个抽象的解释操作
* @author stone
*
*/
public interface Interpreter {
public void interpret(Context context); //实际中,可以有个返回的类型,定义解释出的数据对象
}
public class XmlSaxInterpreter implements Interpreter...
分类:
编程语言 时间:
2014-10-14 19:23:49
阅读次数:
167
类图
public interface IMediator {
public void createMediator();
public void work();
}
/**
* 中介、调节实际上需要交互的两个元素,让其松耦合
* @author stone
*
*/
public class Mediator implements IMediator {
pr...
分类:
编程语言 时间:
2014-10-14 18:44:59
阅读次数:
192
removing vmware debugger from visual studiobyRosson 十月 14, 2010 at 5:30 下午 underVisual Studio|VMWareA quick tip to anyone who's having trouble with re...
分类:
系统相关 时间:
2014-10-14 17:26:49
阅读次数:
211
/**
* @author stone
*/
public class WindowState {
private String stateValue;
public WindowState(String stateValue) {
this.stateValue = stateValue;
}
public String getStateValue() {
retur...
分类:
编程语言 时间:
2014-10-14 00:46:17
阅读次数:
217
/**
* 数据对象
* @author stone
*
*/
public class DataState {
private String action;
public void setAction(String action) {
this.action = action;
}
public String getAction() {
return action;...
分类:
编程语言 时间:
2014-10-13 23:20:27
阅读次数:
250
类图
/**
* 抽象责任
* @author stone
*
*/
public abstract class IFilter {
private IFilter successor;
public IFilter getSuccessor() {
return successor;
}
public void setSuccessor(IFilter succ...
分类:
编程语言 时间:
2014-10-11 22:06:46
阅读次数:
248
类图
/**
* 自定义集合接口, 类似java.util.Collection
* 用于数据存储
* @author stone
*
*/
public interface ICollection {
IIterator iterator(); //返回迭代器
void add(T t);
T get(int index);
}
/**
* 自定义迭代器接口 类...
分类:
编程语言 时间:
2014-10-11 15:17:15
阅读次数:
172
1. Java自带的实现
类图
/**
* 观察目标 继承自 java.util.Observable
* @author stone
*
*/
public class UpdateObservable extends Observable {
private int data;
public UpdateObservable(Observer observer)...
分类:
编程语言 时间:
2014-10-10 21:37:14
阅读次数:
285
/**
* 策略模式:针对同一命令(或行为),不同的策略做不同的动作
* 商品促销
* 本类为:收取现金的类
*
* @author stone
*/
public interface ICashSuper {
double acceptCash(double money);
}
/**
* 正常收取现金
* @author stone
*
*/
public ...
分类:
编程语言 时间:
2014-10-10 19:17:14
阅读次数:
148
类图
/**
* 业务流程模板,提供基本框架
* @author stone
*
*/
public abstract class BaseTemplate {
public abstract void part1();
public abstract void part2();
public abstract void part3();
//这里为了严格实验结...
分类:
编程语言 时间:
2014-10-10 18:58:14
阅读次数:
222