Decorator pattern
Design pattern in object-oriented programming
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object dynamically, without affecting the behavior of other instances of the same class. The decorator pattern is often useful for adhering to the Single Responsibility Principle, as it enables functionality to be distributed across classes with distinct concerns.
Nº Q23839 ★★
Uncommon · Knowledge
Decorator pattern
Design pattern in object-oriented programming
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object dynamically, without affecting the behavior of other instances of the same class. The decorator pattern is often useful for adhering to the Single Responsibility Principle, as it enables functionality to be distributed across classes with distinct concerns.
Last price
—
Floor price
—
7-day median
—
30-day sales
0
30-day range
—
In circulation
0
Price history
median
low – high
sales
No sales in this period
Show table
| Date | median | Low | High | sales |
|---|
Sales history
- Last sale
- —
- 30-day average
- —
- 30-day low
- —
- 30-day high
- —
- Sales 7d
- 0
- Sales 30d
- 0
No sales yet.
Anonymous sales: no buyer or seller shown. Figures count player-to-player sales only.
From Wikipedia
In object-oriented programming, the decorator pattern is a design pattern that allows behavior to be added to an individual object dynamically, without affecting the behavior of other instances of the same class. The decorator pattern is often useful for adhering to the Single Responsibility Principle, as it enables functionality to be distributed across classes with distinct concerns. It also supports the Open–Closed Principle, since a class's functionality can be extended without modifying its source code. Using decorators can be more flexible and efficient than subclassing, as an object's behavior can be augmented or combined at runtime without creating an entirely new class hierarchy.
Text: Wikipédia, CC BY-SA 4.0. · Image: Lbiselli (CC BY-SA 4.0) ·
Related cards
Observer pattern
Design pattern
Nº Q818562 ★★
Visitor pattern
Design pattern
Nº Q830719 ★★
Facade pattern
Software design pattern that provides a simplified interface
Nº Q428170 ★★
Dependency injection
Technique in software engineering
Nº Q635336 ★★★
Singleton pattern
Design pattern in object-oriented software development
Nº Q746699 ★★★
Design Patterns
1994 software engineering book
Nº Q1283101 ★★★