摘要: 简单工厂模式 应用场景:根据xyz三种类型,有不同的行为。 if(type == x) dosomethingX(); else (type == y) dosomethingY(); else (type == z) dosomethingZ(); 可以考虑工厂模式。 阅读全文
posted @ 2016-12-04 16:27 無限大 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 单例模式 工厂模式 阅读全文
posted @ 2016-12-04 16:09 無限大 阅读(95) 评论(0) 推荐(0) 编辑