Statements (23)
Predicate | Object |
---|---|
gptkbp:instance_of |
gptkb:design
|
gptkbp:benefits |
promotes code reuse
can lead to complex code structure provides flexibility in adding responsibilities |
gptkbp:category |
structural pattern
|
gptkbp:example |
Buffered Reader in Java
Coffee and Milk in a coffee shop example Input Stream in Java Text View in Android |
https://www.w3.org/2000/01/rdf-schema#label |
The Decorator
|
gptkbp:is_implemented_in |
adds new functionality
wraps an object |
gptkbp:is_often_used_in |
gptkb:Java
gptkb:Python gptkb:C# |
gptkbp:origin |
Gang of Four book
|
gptkbp:purpose |
add behavior to objects dynamically
|
gptkbp:related_pattern |
Adapter pattern
Composite pattern Facade pattern |
gptkbp:related_to |
object-oriented programming
|
gptkbp:bfsParent |
gptkb:The_Dick_Emery_Show
|
gptkbp:bfsLayer |
6
|