当前位置:首页 > 设计模式

设计模式

  • 最新
  • 浏览
  • 评论

状态模式

canca19年前 (2007-03-26)421
//状态模式//CopyRight(C) CAnca software Office.2006//Created by CAnca.//说明:将状态封装成一个独立的类.状态父类中的方法是状态管理器的方法.//适用于多分支判断,例:画图软件.选择某种工具,有不同的效果出现. public class...

中介者模式

canca19年前 (2007-03-26)521
//中介者模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. public class MediatorMode{ public static void main(String[] args){  ...

职责链模式

canca19年前 (2007-03-26)544
//职责链模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. public class ResponsibilityMode{ public static void main(String[] args){ ...

模板方法模式

canca19年前 (2007-03-26)541
//模板方法模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. public class TemplateMode{ public static void main(String[] args){ &nbs...

命令模式

canca19年前 (2007-03-26)470
//命令模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. public class CommandMode{ public static void main(String[] args){  R...

解释器模式

canca19年前 (2007-03-26)411
//解释器模式--真实例子//CopyRight(C) CAnca software Office.2006//Created by CAnca. import java.util.*; public class InterpretMode_RealWorld{ public static...

观察者模式

canca19年前 (2007-03-26)440
//观察者模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. import java.util.*; public class ObserverMode{ public static void main(String...

访问者模式

canca19年前 (2007-03-26)482
//访问者模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. import java.util.*; public class VisitorMode{ public static void main(String[...

迭代器模式

canca19年前 (2007-03-26)503
//迭代器模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. import java.util.*; public class IteratorMode{ public static void main(String...

策略模式

canca19年前 (2007-03-26)496
//策略模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. public class StrategyMode{ public static void main(String[] args){  ...

备忘录模式

canca19年前 (2007-03-26)419
//备忘录模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. public class MementoMode{ public static void main(String[] args){  ...

组合模式

canca19年前 (2007-03-26)480
//组合模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. import java.util.*; public class ComponantMode{ public static void main(String...

装饰模式

canca19年前 (2007-03-26)430
//装饰模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. public class DecoratorMode{ public static void main(String[] args){  ...

享元模式

canca19年前 (2007-03-26)528
//享元模式//CopyRight(C) CAnca software Office.2006//Created by CAnca. import java.util.*; public class ShareMode{ public static void main(String[] a...

外观模式

canca19年前 (2007-03-26)484
//外观模式//CopyRight(C)CAnca Software Office. 2006//Created by CAnca. public class FacadeMode{ public static void main(String[] args){  Fa...