/**
* @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
/**
* 字母
* @author stone
*
*/
public class Letter {
private String name;
public Letter(String name) {
this.name = name;
}
public String getName() {
return name;
}
}/**
* 一个产生字母对象的 享元工...
分类:
编程语言 时间:
2014-10-10 14:46:14
阅读次数:
182
类图
/**
* 树 整体
*
* @author stone
*
*/
public class Tree {
private TreeNode root; //根节点
public Tree(String name) {
this.root = new TreeNode(name);
}
public TreeNode getRoot() {
re...
分类:
编程语言 时间:
2014-10-09 21:08:25
阅读次数:
213
/**
* 手机壳、套
* @author stone
*
*/
public abstract class BaseCellphoneShell {
public abstract void mapping();//对应匹配哪种手机
}/**
* 手机,桥接了 手机壳BaseCellphoneShell
* @author stone
*/
public abstract cla...
分类:
编程语言 时间:
2014-10-09 17:14:58
阅读次数:
176