decorator-degenerate-composite-one-child

Status: IN

Decorator and Composite both use recursive composition through a common interface and can share a common parent class when combined — but Decorator holds a single reference to a Component and adds responsibilities dynamically, while Composite holds a collection of Components to represent part-whole hierarchies.

Source: entries/2026/06/17/gof-oo-chunk-12.md

Depended on by

JSON