...装饰模式(Decorator Pattern):动态地给一个对象增加一些额外的职责,就增加对象功能来说,装饰模式比生成子类实现更为灵活。装饰模式是一种对象结构型模式。
基于1442个网页-相关网页
...装饰器模式(Decorator Pattern): 允许向一个已有的对象添加新的功能或部分内容,同时又不改变其结构。属于结构型模式,它是作为现有的类的一个包装。
基于137个网页-相关网页
以上来源于: WordNet
Figure 4 shows a class diagram for the decorator pattern.
图4显示了装饰器模式的类图。
The general "decorator pattern" is a design pattern that allows adding new behavior to an existing component dynamically.
一般的“装饰模式”是一种设计模式,允许动态地向现有组件添加新的行为。
Enter the decorator pattern, which allows you to add this functionality onto the AutomobileModel in a nice, clean class.
进入装饰器模式,该模式允许您通过一个优秀整洁的类将此功能添加到AutomobileModel。
应用推荐