摘要: 工厂方法 Factory Method Define an interface for creating an object. but let subclasses decide which class to instantiate. Factory Method lets a class defe 阅读全文
posted @ 2023-07-03 17:09 !ɹO 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 装饰器模式 Decorator Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to subclassing for extending fu 阅读全文
posted @ 2023-07-03 14:53 !ɹO 阅读(9) 评论(0) 推荐(0) 编辑