Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.
将对象组合为树状结构,以便用户以统一的方式使用单个对象和对象组合。
Node
) Request()
)。Add()
, Remove()
, GetChild()
)。Leaf
) Tree
) Add()
, Remove()
, GetChild()
)。Client
)