Composite

xiaoxiao2021-03-06  69

Benefits:. • It defines class hierarchies consisting of primitive and complex objects • It makes it easier for you to add new kinds of components • It provides the flexibility of structure with a manageable interface..

Applicable Scenarios: • You want to represent a full or partial hierarchy of objects • You want clients to be able to ignore the differences between the varying objects in the hierarchy • The structure is dynamic and can have any level of complexity:.. For example Using the Composite View from the J2EE Patterns Catalog, Which IS Useful for Portal Applications.

转载请注明原文地址:https://www.9cbs.com/read-120219.html

New Post(0)