设计模式:结构型-组合模式
Compose objects into tree structure to represent part-whole hierarchies.Composite lets client treat individual objects and compositions of objects uniformly.
设计模式:结构型—装饰器模式
设装饰器模式定义装饰器模式(Decorator Pattern)是一种结构型设计模式, 允许你通过将对象放入包含行为的特殊封装对象中来为原对象绑定新的行为,在保持类方法签名完整性的前提下,提供了额外的功能。