Composite pattern

E680644

The Composite pattern is a structural design pattern that lets you treat individual objects and compositions of objects uniformly by organizing them into tree-like hierarchies.

All labels observed (2)

Label Occurrences
Composite pattern canonical 6
Composite design pattern 1

How this entity was disambiguated

Statements (48)

Predicate Object
instanceOf software design pattern ⓘ
advantage makes it easy to add new kinds of components ⓘ
promotes transparency between leaf and composite objects ⓘ
simplifies client code by providing a uniform interface ⓘ
supports recursive structures ⓘ
applicableWhen you want clients to ignore the difference between individual objects and compositions ⓘ
you want to represent part-whole hierarchies of objects ⓘ
belongsTo Gang of Four design patterns ⓘ
canBeImplementedIn C# ⓘ
C++ ⓘ
Java ⓘ
Python ⓘ
ClientRoleResponsibility manipulates objects in the composition through the Component interface ⓘ
ComponentRoleResponsibility declares interface for accessing and managing child components ⓘ
declares interface for objects in the composition ⓘ
implements default behavior for common interface operations ⓘ
CompositeRoleResponsibility defines behavior for components having children ⓘ
implements child-related operations such as add and remove ⓘ
stores child components ⓘ
definesRole Client ⓘ
Component ⓘ
Composite ⓘ
Leaf ⓘ
describedIn Design Patterns: Elements of Reusable Object-Oriented Software ⓘ
disadvantage can make it harder to restrict the components of a composite ⓘ
can make the design overly general ⓘ
encourages use of polymorphism over explicit type checks ⓘ
firstPublishedYear 1994 ⓘ
hasAlias Object tree pattern ⓘ
hasIntent allow clients to treat individual objects and compositions uniformly ⓘ
compose objects into tree structures to represent part-whole hierarchies ⓘ
LeafRoleResponsibility defines behavior for primitive objects ⓘ
represents leaf objects in the composition ⓘ
oftenUsedIn document object models ⓘ
file system directory and file representations ⓘ
graphical user interface component hierarchies ⓘ
scene graphs in graphics engines ⓘ
originatedFrom object-oriented design community ⓘ
relatedTo Decorator pattern ⓘ
linked to: Decorator

Flyweight pattern ⓘ
linked to: Flyweight

Iterator pattern ⓘ
Visitor pattern ⓘ
supports part-whole hierarchy modeling ⓘ
recursive composition of objects ⓘ
uniform treatment of leaf and composite objects ⓘ
supportsOperationStyle operations defined at Component and implemented recursively by Composite ⓘ
typicalOperationExample operation that traverses children and aggregates results ⓘ
usesStructure tree ⓘ

How these facts were elicited

Referenced by (7)

Full triples — surface form annotated when it differs from this entity's canonical label.

Chain of Responsibility → relatedTo → Composite pattern ⓘ
Interpreter → relatedTo → Composite pattern ⓘ
Visitor → collaboratesWith → Composite pattern ⓘ
Visitor → relatedTo → Composite pattern ⓘ
Iterator design pattern → relatedTo → Composite design pattern ⓘ
linked to: Composite pattern
Iterator pattern → relatedTo → Composite pattern ⓘ
Gang of Four design pattern → hasExample → Composite pattern ⓘ