2022年4月20日

享元模式

摘要: package com.life.design.flyweight; public abstract class WebSite { public abstract void use(String name);//抽象方法 } package com.life.design.flyweight; / 阅读全文

posted @ 2022-04-20 22:29 金满仓 阅读(28) 评论(0) 推荐(0) 编辑

外观模式

摘要: package com.life.design.facade; public class SmartAppliancesFacade { private Light light; private TV tv; private AirCondition airCondition; public Sma 阅读全文

posted @ 2022-04-20 18:58 金满仓 阅读(22) 评论(0) 推荐(0) 编辑

组合模式

摘要: package com.life.design.composite; public abstract class MenuComponent { protected String name; protected int level; public void add(MenuComponent men 阅读全文

posted @ 2022-04-20 09:58 金满仓 阅读(22) 评论(0) 推荐(0) 编辑

导航